Jim, That is called a "list comprehension", and it is a feature which appeared in python 2.3 (iirc). Thus if your books are about earlier versions of python, list comprehensions will not be covered.
Check out the section of the tutorial about them at http://docs.python.org/tut/node7.html#SECTION007140000000000000000 . Peace Bill Mill bill.mill at gmail.com On Tue, 08 Feb 2005 06:50:08 -0800 (PST), Jim <[EMAIL PROTECTED]> wrote: > Where did this type of structure come from: > > mat = ['a' for i in range(3)] ? > > This will produce a list of three elements but > I don't see reference for it in any of the books. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list