I am receving a string through a socket like so
"['[0,0,0]','[0,0,0]']"
I would like to convert it back to a array. I have tried using
received.split(",")
however it splits up the arrays inside the array.
How would I go about converting the string to an array?
Using
literal_eval
is safer thaneval
. From the docs: