Anonymous user
Runtime evaluation: Difference between revisions
→{{header|Python}}
(explicitly mention envs) |
|||
Line 68:
=={{header|Python}}==
The [http://docs.python.org/reference/simple_stmts.html#exec exec statement] allows the optional passing in of global and local names via mappings (See the link for full syntax). The example below shows exec being used to parse and execute a string containing two statements:
<lang python>>>> exec '''
x = sum([1,2,3,4])
|