execute python in linux terminal code example
Example 1: running python script from terminal ubuntu
python <filename.py>
Example 2: python fuction execute a script site:realpython.com
>>> exec(open('hello.py').read())
'Hello World!'
python <filename.py>
>>> exec(open('hello.py').read())
'Hello World!'