How to convert a string with comma-delimited items to a list in Python?

Like this:

>>> text="a,b,c"
>>> text = text.split(',')
>>> text
[ 'a', 'b', 'c' ]

Leave a Comment