If you came across this error, keep on reading to learn how to fix it. File "<stdin>", line 1 & C:/Users/Chanaka/AppData/Local/Microsoft/WindowsApps/PythonSoftwareFoundation.Python.3.9/python.exe g:/CP/hello_world.py ^ SyntaxError: invalid syntax I got this error for a simple hello world python code. Python files cannot be run within the interpreter. Sounds weird right? Python cannot be run within Python! 🙄 I know why but my thought process is not quite clear. Until I process my thoughts, try THE fix. I wish the error message was descriptive for noobs like me. FIX Type exit() in the Visual Studio Code terminal and press enter, as shown below. Then run the Python file in the terminal. Ta Da! You should not see this error again. Happy Pythoning.
Countries like Korea, Malaysia and Singapore are well above Sri Lanka in terms of economic prosperity. Sri Lanka had the same initial conditions belonged to those afore mentioned countries. But what hampered Sri Lanka’s economic growth? ; According to my economic sense, the culprits are the “free” education and the “free” health. The word “free” is within quotations for two reasons. First reason is a universal truth. There is nothing free in this world. Free welfare is distributed at the expense of taxpayer’s money. The second reason is that even though “free” (which is distributed as a benefit) it’s the perpetrator of Sri Lanka’s hindered economic growth. Sri Lanka boasts a superior literacy rate. But unfortunately intellectuals and skilled labors have no business projects in Sri Lanka to efficiently utilize their skills and abilities. They go abroad in search of better employment opportunities. They should not be blamed. They bring money to Sri Lanka. But if their skills were employ...
Hi World. This blog will be my window to the world. This is my first blog post. I hope to produce something valuable for you. IT is one of my favorites. I'm glad to share my thoughts with you. Please comment.
Comments