Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 532 Bytes

README.md

File metadata and controls

28 lines (17 loc) · 532 Bytes

Python Evaluation

https://www.hackerrank.com/challenges/python-eval

Problem

The eval() expression is a very powerful built-in function of Python. It helps in evaluating an expression. The expression can be a Python statement, or a code object.

Task

You are given an expression in a line. Read that line as a string variable, such as var, and print the result using eval(var).

Sample Input 0

print(2 + 3)

Sample Output 0

5

My Solution