DEV Community

Discussion on: A string to calculation in python

Collapse
 
spez profile image
Abhigyan • Edited

There is a built-in function available in Python 3.x. The "eval()" function requires a string to be passed on and returns the calculated value for it. It's even available in JavaScript, BTW...

Read more here

Collapse
 
kwardee profile image
KwarDee

Thank you so so much 💯