Answers for "convert string input into a nested tuple in python"

0

convert string input into a nested tuple in python

import ast
inp = '((1, 2), (3, 4))'
inp = ast.literal_eval(inp)
print(inp)
Posted by: Guest on February-03-2022

Code answers related to "convert string input into a nested tuple in python"

Python Answers by Framework

Browse Popular Code Answers by Language