problem using array of instances

Anton Muhin antonmuhin at sendmail.ru
Tue Feb 11 15:27:25 EST 2003


Don Arnold wrote:
> 
> for i in range(10):
>     pop.append(boat(i))
> 
> for i in range(9,-1,-1):
>     launch(i)
> 
> 

Just a small note: I would prefer to construct pop in ifferent way:

pop = [boat(i) for i in range(10)]

HTH,
Anton.





More information about the Python-list mailing list