How do you convert a string into a list?
Say the string is like
text = "a,b,c". After the conversion,
text == ['a', 'b', 'c'] and hopefully
text == 'a',
text == 'b'?
>>> text = 'a,b,c' >>> text = text.split(',') >>> text [ 'a', 'b', 'c' ]
Alternatively, you can use
eval() if you trust the string to be safe:
>>> text = 'a,b,c' >>> text = eval('[' + text + ']')
Just to add on to the existing answers: hopefully, you'll encounter something more like this in the future:
>>> word = 'abc' >>> L = list(word) >>> L ['a', 'b', 'c'] >>> ''.join(L) 'abc'
But what you're dealing with right now, go with @Cameron's answer.
>>> word = 'a,b,c' >>> L = word.split(',') >>> L ['a', 'b', 'c'] >>> ','.join(L) 'a,b,c'