python

[Python] Eval() function

# The eval() method parses the expression passed to this method 
# and runs python expression (code) within the program.
x = 1
print(eval('x + 1'))
Output
2
Was this helpful?