Matthias Winterland wrote: > Hi, > > I have a simple question. When I read in a string like: > a='1,2,3,4,5 6 7,3,4', can I get the list l=[1,2,3,4,5,6,7,3,4] with a > single split-call?
You can't get what you want with a single method call. You can do it with a single call to .split() if you preprocess the string first: a.replace(',', ' ').split() -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list