How do we use Python in script mode?

PythonServer Side ProgrammingProgramming

It is possible to execute Python script from command line. Python program can be written by any text editor (preferably a Python aware text editor) and saved with .py extension. To write basic Hello World program using IDLE, the Python IDE shipped with standard Python distribution, open the editor choosing File->New.


Type following lines and save as

 Print (“Hello World”)

Execute the script using following command line 


You can also run the script from Run Menu of IDLE file editor

Updated on 13-Dec-2019 11:25:41