What is an alternative to execfile in Python 3?

According to the documentation, instead of

execfile("./filename") 

Use

exec(open("./filename").read())

See:

Leave a Comment