Categories
How to calculate an expression in a string?
Greetings Line: a = '1+2-3*4/5+(10//3)' How to calculate the result in the simplest way?
a = '1+2-3*4/5+(10//3)'
Answer the question
In order to leave comments, you need to log in
a = '1+2-3*4/5' eval(a)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question