# built-in function eval() takes a string and evaluates it using the Python interpreter
eval('1 + 2 * 3')
>> 7
import math
eval('math.sqrt(5)')
>> 2.2360679
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter