The following Python code is given as a string: code = 'import math; print(math.pi)' What built-in function can you use to execute this code?

Questions & AnswersCategory: PythonThe following Python code is given as a string: code = 'import math; print(math.pi)' What built-in function can you use to execute this code?
Geek Boy Staff asked 2 years ago

The following Python code is given as a string:

code = 'import math; print(math.pi)'

What built-in function can you use to execute this code?
a. enumerate()
b. compile()
c. eval()
d. repr()
e. exec()