0
How can I change str(+) to int(+) with python?
I'd like to change this x = ' 1 + 1 ' print(int(x)) output 2
1 Antwort
+ 5
The simple answer would be eval(), but of course, ignoring how notorious it is:
https://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html