From: Mark Watson Date: 2009-01-10T05:24:36+09:00 Subject: Re: Q: most efficient way to remove duplicate spaces in a string? On Jan 9, 11:20 am, Mark Watson wrote: > I don't usually worry too much about efficiency unless runtime > performance becomes an issue so I use a_string.split.join(' ') to > remove extra spaces because the code is short and readable. > > This is certainly inefficient. What is the fastest idiom for this > operation? > > Thanks, > Mark Thanks to everyone who responded! Best regards, Mark