how to run a python file in with python3 code example Example: run python file using python code exec(open('file.py').read())