string type
a = " ['a','b','c']"
expected list:
a
> ['a','b','c']
How would I convert a list form in string to a true list?
string type
a = " ['a','b','c']"
expected list:
a
> ['a','b','c']
How would I convert a list form in string to a true list?
give the below a try:
eval(a.strip(' '))
EDIT:
eval is evil. Please see the link provided by e.doroskevic !!