+ 1
Syntax error??
like i input something like >>>input('enter something') enter something:2 it shows syntax error m using Python 3.6.0
4 Respuestas
+ 5
x = input('how are you?')
+ 1
do you have the full code example (copy paste?) that you can share?
or the full error code that is being displayed? hard to know what may be the underlying cause. Post it up if problem not solved, if so just post that you found the solution and put it here in case others find it useful :)
0
remove : before 2
0
Why your 'enter something:2' is not from new line?
Should be something like this:
>>> a = input('enter something') (press enter here)
enter something:2 (type :2 here)
>>> a
':2'
>>> input('enter something')
enter something:2
':2'
>>> input('enter something') enter something:2 - how you did it
SyntaxError: invalid syntax
How it works:
input('this is just text :')
this is just text :hey! - I've entered just "hey" after enter
'hey!'