9

I have a stringified list:

a = ['one', 'two']
a = str(a)

After which, a would be

"['one', 'two']"

Is there a way to go from this string format back to a list like the original format?

Thanks

intl
  • 2,753
  • 9
  • 45
  • 71

1 Answers1

11

use eval :

a = eval("['one', 'two']")
sachin saxena
  • 926
  • 5
  • 18