exec(open('file.py').read())
# save a file in text editor with .py
# open terminal, and change directories
# run the following command:
python3 file.py
# Save the script in a file with .py extension
# run the script using the below command
python fileName.py
C:UsersParacha> python myfile.py
#plz suscribe to my youtube channel -->
#https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A
command = "print('Hi World')
exec(command)
#terminal, <python path> <python file>
/usr/bin/python /mydir/myscript.py
import os
os.sys("python script.py")