[issue6475] Documentation > Tutorial > List Comprehensions
Ezio Melotti
report at bugs.python.org
Mon Jul 13 17:16:01 CEST 2009
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
That example was introduced in r16743 as:
>>> spcs = [" Apple", " Banana ", "Coco nut "]
>>> print [s.strip() for s in spcs]
['Apple', 'Banana', 'Coco nut']
and was changed in r16831 to:
>>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']
>>> [weapon.strip() for weapon in freshfruit]
['banana', 'loganberry', 'passion fruit']
I think that the fresh fruits can really be considered as dangerous
weapons - especially the banana. <wink>
----------
nosy: +ezio.melotti
priority: -> low
resolution: -> rejected
status: open -> pending
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6475>
_______________________________________
More information about the Python-bugs-list
mailing list