There are a series of built-in methods for string objects; including the split 
method which will accomplish exactly the result you are looking for.

>>> x = "red;blue;green;yellow"
>>> color_list = x.split(';')
>>> color_list
['red', 'blue', 'green', 'yellow']
>>> 

Here is the link to a discussion of the build-in str methods (3.2), but this 
documentation exists for prior versions of Python as well.

      http://docs.python.org/py3k/library/stdtypes.html#str.split

Good luck,

Mark Niemczyk
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to