Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # safe_eval.py
- import ast
- stringTuple = '("hello world", 20, 1.0)'
- t = ast.literal_eval(stringTuple)
- for s in t: print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement