python open linux terminal and run command code example
Example 1: how to run linux command in python
import os
cmd = 'your command here'
os.system(cmd)
Example 2: how to run python in terminal
#For Python 3:
$ python3 helloworld.py
#For Python 2:
$ python helloworld.py