r/learnpython • • 11h ago

About running python code in terminal

Guys, I am beginner. I have the python code and have saved in file. Now I want to place the file path in the terminal and run that code. I don't know what should I write before adding the file path? Please help!

5 Upvotes

16 comments sorted by

View all comments

1

u/Due-Mortgage-6854 10h ago

python or python3 or py followed by your PATH/file.py

2

u/South-Put-7948 9h ago

Thank you it worked