I have a string: '[1, 2, 3]'
I want to convert it to: [1, 2, 3]
I know there was a single bif that I could use, but I couldn't find it or for the life of me recall what it was.
I know someone out there remembers, any help would be greatly appreciated.
To process a string as if were code:
>>> eval('[1, 2, 3]')
[1, 2, 3]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With