SyntaxFix
Write A Post
Hire A Developer
Questions
Like this:
>>> text = 'a,b,c' >>> text = text.split(',') >>> text [ 'a', 'b', 'c' ]
Alternatively, you can use eval() if you trust the string to be safe:
eval()
>>> text = 'a,b,c' >>> text = eval('[' + text + ']')