In this HackerRan Evaluation problem solution, 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).

HackerRank Python Evaluation in python problem solution

HackerRank Python Evaluation in python problem solution

# Enter your code here. Read input from STDIN. Print output to STDOUT
from __future__ import print_function
eval(input())

Second solution

# Enter your code here. Read input from STDIN. Print output to STDOUT
from __future__ import print_function
var = raw_input()
eval(var)