I just start learning python programming. I wrote a simple program in python 3.8.2:
x = "Hi world"
print (x)
Code was saved in a python file named 'file.py'. It ran correctly in python. The problem is when try to run the same chunk of code in the command line of windows 10.
After cmd was opened, i set the path at the directory where the file is saved, in this case, my desktop. Then i tried to run the next command:
C:\Users\Ben\Desktop>python file.py
The program was not work. Windows shows me the following message:
File "file.py", line 1 Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32 ^ SyntaxError: invalid syntax
I will appreciate all your help.
"
in your code. (Just to be sure, I'm assuming you aren't using these>>>
in your file.py?) – Elijan9 Mar 18 '20 at 14:29