๐Ÿ“– Beginning Python Programming /
Module: Basic Python

Running Python

๐Ÿ“– Beginning Python Programming / Basic Python / Running Python

Running .py file

Running in command-line / terminal

  1. Put python code in anyname.py file
  2. Open terminal
  3. Navigate to the folder containing the file
  4. Type python anyname.py

Running by double-clicking .py file on windows

  1. Save the file to file system.
  2. Double click the .py file
  3. Command prompt launches and the python script runs
  4. Command prompt automatically closes after completion.