I have a list written in a string how I can turn it into a real list in Python example:
list 1 = "[[1,2],
[3,4]]"
thank you
I have a list written in a string how I can turn it into a real list in Python example:
list 1 = "[[1,2],
[3,4]]"
thank you
Use ast.literal_eval
to safely evaluate the list
list_1 = "[[1,2], [3,4]]"
l=ast.literal_eval(list_1)
References: