"Dotan Cohen" <[EMAIL PROTECTED]> wrote > Does 'list comprehension' mean a detailed explanation of the code?
No its a programming construct found in Function programming languages such as Haskell (Python is partially functional in nature). Basically a list comprehension builds a list lc = [item_expression for item in collection if item_test] This is equivalent to lc = [] for item in collection: if item_expression: lc.append(item_expression) But it's shorter and usually faster. See the functional programming topic of my web tutor for more info and examples. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor