I know there are similar posts to this topic, however they often focus on the list items being letters and so the outcome often means they are wrapped in double quotes.
However, I am dealing with lists of numbers and I have been unable to find a solution that addresses my need for converting a string representation of a list of numerical lists ...
"[1,2,3,4,5,6],[5,1,4,6,3,2],[3,6,4,1,5,2]"
... into an actual list
of numerical list
s, as I mentioned I am dealing with numerical items for math.
list_string = "[1,2,3,4,5,6],[5,1,4,6,3,2],[3,6,4,1,5,2]"
ini_list = "[" + list_string + "]"
goal = list(ini_list)
print(goal)
#Desired Outcome:
#goal = [[1,2,3,4,5,6],[5,1,4,6,3,2],[3,6,4,1,5,2]]