0

Operator conversion in python

In one of my codes, I have value of variable n as: n='1+53' How can I get result of 54 as output?

1st Aug 2018, 3:05 PM
Sahil Danayak
Sahil Danayak - avatar
1 Odpowiedź
+ 1
n='1+53' print(eval(n))
1st Aug 2018, 3:57 PM
MO ELomari
MO ELomari - avatar