:returns: The result of the evaluated expression.
:raises: Syntax errors are reported as exceptions.
+ .. warning::
+
+ This function executes arbitrary code. Calling it with
+ user-supplied input may lead to security vulnerabilities.
+
The *expression* argument is parsed and evaluated as a Python expression
(technically speaking, a condition list) using the *globals* and *locals*
dictionaries as global and local namespace. If the *globals* dictionary is
.. function:: exec(object, globals=None, locals=None, /, *, closure=None)
+ .. warning::
+
+ This function executes arbitrary code. Calling it with
+ user-supplied input may lead to security vulnerabilities.
+
This function supports dynamic execution of Python code. *object* must be
either a string or a code object. If it is a string, the string is parsed as
a suite of Python statements which is then executed (unless a syntax error