On Fri, 13 May 2011 10:15:29 -0700, noydb wrote: > I want some code to take the items in a semi-colon-delimted string > "list" and places each in a python list. I came up with below. In the > name of learning how to do things properly, do you experts have a better > way of doing it?
How about the below? dan@dan:~/development$ python Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = "cyan;magenta;yellow;black" >>> xList = x.split(';') >>> xList ['cyan', 'magenta', 'yellow', 'black'] >>> -- http://mail.python.org/mailman/listinfo/python-list