eval
>>> a="[1,2]" >>> type(a) <class 'str'> >>> a '[1,2]' >>> b=eval(a) >>> b [1, 2] >>> type(b) <class 'list'> >>> a="[1,221]" >>> b=eval(a) >>> b [1, 221] >>> c=list(a) >>> c ['[', '1', ',', '2', '2', '1', ']'] >>> type(c) <class 'list'>
LESS IS MORE !