From: Mark Watson Date: 2009-01-10T03:24:37+09:00 Subject: Q: most efficient way to remove duplicate spaces in a string? 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