Python exec() - Programiz
www.programiz.com › python-programming › methodsDictionary is the standard and commonly used mapping type in Python. The use of globals and locals will be discussed later in the article. Return Value from exec () exec () doesn't return any value, it returns None. Example 1: How exec () works? program = 'a = 5 b=10 print ("Sum =", a+b)' exec (program) Output Sum = 15