[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] simple question about creating multiple instances of a sprite



hullo,

this way would be ok perhaps?

num = 10
a_list_of_sprites = [sprite() for _ in range(num)]



On Fri, Apr 11, 2008 at 1:50 PM, Devon Scott-Tunkin
<djvonfunkin@xxxxxxxxx> wrote:
> Please forgive my programming ignorance, but is there
>  a simpler way to create multiple instances of a sprite
>  than say:
>
>  sprite(), sprite(), sprite(), sprite(), sprite()?
>
>  Devon
>
>
>
>
>  __________________________________________________
>  Do You Yahoo!?
>  Tired of spam?  Yahoo! Mail has the best spam protection around
>  http://mail.yahoo.com
>