Loop in list.

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Tue Feb 8 16:26:09 EST 2005


Jim a écrit :
> 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.
> 
Now everyone told you *what* is it, I'll (very very dumbly) answer the 
question : this syntax comes from Haskell.

HTH !-)
Bruno



More information about the Python-list mailing list