A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/006928.html below:

[Python-Dev] Patches

[Python-Dev] PatchesPaul Prescod paul@prescod.net
Tue, 18 Jul 2000 20:45:24 -0500
Skip Montanaro wrote:
> 
> ...
> newlist = map(string.strip, oldlist)
> 
> As far as I'm aware, there's no clean way to do that with string methods.

Once we have list comprehensions, there will be:

newlist = [for x in oldlist: x.strip()]

I think the list-comp version is much more readable and "generic".

-- 
 Paul Prescod - Not encumbered by corporate consensus
Just how compassionate can a Republican get before he has to leave the 
GOP and join Vegans for Global Justice? ... One moment, George W. Bush
is holding a get-to-know-you meeting with a bunch of gay Republicans.
The next he is holding forth on education or the environment ... It is
enough to make a red-blooded conservative choke on his spotted-owl
drumstick.     - April 29th, Economist



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4