how to run python in terminal

Shell
#For Python 3:
$ python3 helloworld.py
#For Python 2:
$ python helloworld.py# Save the script in a file with .py extension
# run the script using the below command
python fileName.py
Source

Also in Shell: