python 3.7.2 is showing 'syntax error' at line 3, why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

python 3.7.2 is showing 'syntax error' at line 3, why?

>>> if 10 > 5: print("10 greater than 5") print("Program ended") SyntaxError: invalid syntax

17th Feb 2019, 11:24 AM
Dee Pan Kar
Dee Pan Kar - avatar
2 Answers
+ 2
Code looks legit. At least runs on Sololearn and I tested also on Python 3.7.1. Make sure you don't have any invisible special characters (whitespace, tab) in the empty lines...
17th Feb 2019, 12:20 PM
Tibor Santa
Tibor Santa - avatar
+ 1
You can see the right code. Hope it helps you. https://code.sololearn.com/cU4Z2JOSC7UI/?ref=app
17th Feb 2019, 11:43 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar