You may haven't understood the question correctly. So here is it in detailed way:
There is a string, let's say, x='200+350'
so now if I do int(x), it'll give me an error.
I want it to evaluate to 550 which is integer.
How may I do that?
You may haven't understood the question correctly. So here is it in detailed way:
There is a string, let's say, x='200+350'
so now if I do int(x), it'll give me an error.
I want it to evaluate to 550 which is integer.
How may I do that?
try to use eval method
eval("200+350")