Syntax error?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Syntax error??

like i input something like >>>input('enter something') enter something:2 it shows syntax error m using Python 3.6.0

14th Mar 2017, 3:41 AM
CoderAss
CoderAss - avatar
4 Answers
+ 5
x = input('how are you?')
14th Mar 2017, 3:46 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 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 :)
14th Mar 2017, 5:22 AM
Elric Hindy
Elric Hindy - avatar
0
remove : before 2
14th Mar 2017, 5:17 AM
Nithin
Nithin - avatar
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!'
14th Mar 2017, 5:11 PM
Stanislav Syarkevich
Stanislav Syarkevich - avatar