Issue
I'm using Python 3.
How can I input an expression without using eval(input("Input: "))
?
I needed eval for an algebra calculator.
Solution
Depending on how complicated your expressions are, ast.literal_eval
may be a safer alternative.
Answered By - Hugh Bothwell
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.