Calculator

samnalty at gmail.com samnalty at gmail.com
Wed Jan 15 10:29:47 EST 2020


On Wednesday, 15 January 2020 15:16:45 UTC, ander... at gmail.com  wrote:
> Hey!
> I’m trying to implement a calculator that converts a string; for excample «3+98*4», to a number. Is there a module or command that I can use to automate this? It’s literal hell making it from scratch.
> 
> -Anders (pycharm)

eval(str) should work :)





More information about the Python-list mailing list