Based on my experience in other scripting languages, I don’t think these are widely used in everyday scripting, but veterans must know.
– exec is a keyword[1] and not a function so can’t return a value.
– eval() is a function so returns a value.
Both accept a string “argument”, or (more advanced) code object from compile() function.
[1] Other keywords include while/for/lamda and raise/try/except — note “except” is like “catch”
See P90 [[py ref]]