Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_parse_string_to_tuples.py
- from ast import literal_eval
- zzz = '''((1, 2), (3, 4), (5, 6), (7, 8), (9, 0), ([0], "It's Python!"), (-2, 'a'))'''
- for z in literal_eval(zzz):
- print(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement