I know the question sounds a bit vague, but this should clear it up.
a = "[200, 30.5, 37]" #This is a string literal, where a[0] = '['
b = [200, 30.5, 37] #This is a list literal, where b[0] = 200
How do I get b from a?
I know the question sounds a bit vague, but this should clear it up.
a = "[200, 30.5, 37]" #This is a string literal, where a[0] = '['
b = [200, 30.5, 37] #This is a list literal, where b[0] = 200
How do I get b from a?
b = eval(a)
This should do the trick.