How do I create a .PY file in Terminal?

Linux (advanced)Edit

  1. save your hello.py program in the ~/pythonpractice folder.
  2. Open up the terminal program. …
  3. Type cd ~/pythonpractice to change directory to your pythonpractice folder, and hit Enter.
  4. Type chmod a+x hello.py to tell Linux that it is an executable program.
  5. Type ./hello.py to run your program!

For More Information Please Refer:
https://en.wikibooks.org/wiki/Python_Programming/Creating_Python_Programs
You May Also Like to Read: