+ 2

Why is this invalid syntax in Python?

I cannot get my code to work and I have absolutely no idea why. i have x=(input("How are you?")) print(x) It is saying print(x) is invalid syntax?

21st Feb 2018, 3:53 PM
Misha Chapman
Misha Chapman - avatar
1 Respuesta
+ 1
The code don't have any error, where you are running? PD: The parentheses before the input are left over, you can write this x = input("How are you? ") PD2:If you want to make the most beautiful exit you can do this: x=input("How are you? \n-> ")
21st Feb 2018, 7:57 PM
Emmanuel David Angarita Quintanilla
Emmanuel David Angarita Quintanilla - avatar