Remove Whitespace

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Fri Apr 14 06:16:46 EDT 2006


Fredrik Lundh schreef:
> John Machin wrote:
> 
>>> $ python2.4 -mtimeit -s "str = 'D c a V e r \" = d w o r d : 0 0 0 0 0 6
>>> 4 0'" 'str.replace(" ", "")'
>> Oi! The OP mentioned "whitespace" ...
> 
> yeah. but as is obvious from his examples, he really means "UTF-16", not
> whitespace.

Yes, that's what I was thinking. His data looks like a part of a Windows 
registry export, which at least on my system is in what Windows calls 
Unicode.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-list mailing list