How do I run my script in the CMD line for python - please help Ive been at it for 4 hours

os.listdir()
[‘ex_02_03.py’, ‘first.py’, ‘notes’]
python3 ex_02_03.py
File “”, line 1
python3 ex_02_03.py
^
SyntaxError: invalid syntax

to clarify I am trying to run this program in the python 3.8 terminal and it work in my windows cmd prompt just am not able to get it to run in the python terminal

so i was able to open up the program and run it in the shell, i dont understand why it didnt run in the terminal…?
why cant I run my program?

Try not putting a space between python and 3.

os.listdir()
[‘ex_02_03.py’, ‘first.py’, ‘notes’]
python3 “ex_02_03.py”
File “”, line 1
python3 “ex_02_03.py”
^
SyntaxError: invalid syntax

SyntaxError: invalid syntax

python3 ex_02_03.py
File “”, line 1
python3 ex_02_03.py
^
SyntaxError: invalid syntax

Hi!

let a space between python3 and your file ex_02_03.py as follows:

python3  ex_02_03.py

try also:

python  ex_02_03.py

What error do you get when you run each of the following commands on the windows cmd prompt?

python3
python