ryan k <[EMAIL PROTECTED]> writes:
> Hello. I have a string like 'LNAME
> PASTA               ZONE'. I want to create a list of those words and
> basically replace all the whitespace between them with one space so i
> could just do lala.split(). Thank you!

import re
s = 'LNAME  PASTA        ZONE'
re.split('\s+', s)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to