James Stroud wrote:
> The one I like best goes like this:
> 
> py> data = "Guido van Rossum  Tim Peters     Thomas Liesner"
> py> names = [n for n in data.split() if n]
> py> names
> ['Guido', 'van', 'Rossum', 'Tim', 'Peters', 'Thomas', 'Liesner']
> 
> I think it is theoretically faster (and more pythonic) than using regexes.

Unfortunately it gives the wrong result.

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to