How do I execute a string containing Python code in Python?
Remember that from version 3 exec is a function! so always use exec(mystring) instead of exec mystring.
exec
exec(mystring)
exec mystring