[EMAIL PROTECTED] writes: > I've seen this construct in a script >>>> [x.capitalize() for x in ['a','b', 'c']] > ['A', 'B', 'C'] > I tried to find a description of this in "Library Reference" but > couldn't find it. Could somebody direct me where this type of construct > is described.
As others have pointed out, it's called a "list comprehension". But it's syntax, so the proper place to look for it is the "Language Reference", not the "Library Reference". Except in this case, the language reference is fairly opaque, so you're better off using the google references others have already provided. You might also look for the related construct, "generator expressions". <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list