For example, I have a string = "[1,2,3,4]" and I want to only have the [1,2,3,4], I tried doing list(mystring) but it gives me:
['[', '1', ',', '2', ',', '3', ',', '4', ']']
I just want to chop off the "" of the string "[1,2,3,4]".
the output I want can be made with the print, it will output:
[1,2,3,4]
but I don't know how to get that output into a variable, can someone help?