List of Objects

7stud bbxx789_05ss at yahoo.com
Fri Apr 20 01:48:15 EDT 2007


On Apr 19, 9:18 pm, Paddy <paddy3... at googlemail.com> wrote:
>
> # create a list of instances
> gazelles= [ Gazelle() for x in range(5)]
>

Nice.  I knew there had to be a way to use a list comprehension, but I
couldn't figure it out.




More information about the Python-list mailing list