Skip to content

Latest commit

 

History

History

eval

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

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