Dec-23-2019, 06:51 PM
(This post was last modified: Dec-23-2019, 06:51 PM by H0M1C1D4L_P1G.)
Just a python noob wondering if there's a better method for delaying the order in which a program asks for an input, rather than just separating commands with ; for instance, in this simple program, the user is asked for the name of their favourite song, followed by the first, second, and third line of the song, and then this information is basically just printed back to them:
song = input("What is your favourite song?\n");line1 = input("What\'s the first line?\n");line2 = input("And the second?\n");line3 = input("Finally, the third line?\n");print(f"\n{song}\n{line1},\n{line2},\n{line3}")As you can see here, I have everything on one line separated with a semicolon (;), as if I was to press enter it would of course execute the line of code so far. Is there another way to separate commands like this without having everything on the same line?