I have converted an array to a string with str(). Is it possible to turn

Sorry, accidentally clicked enter before I finished typing.

I have converted an array to a string with str(). Is it possible to turn the outputted string back into an array? The string looks like this: [-1, [2, 0, 0, 0, 5, 1], 1]

Does it have to be that exact string representation? If not, you could use to_json and parse_json functions

var json_string = to_json(my_array) var new_array = parse_json(json_string)

Thank you! This is exactly the kind of thing I was looking for.

2 years later