List behaviour

Gabriel gabe at dragffy.com
Thu May 15 06:51:27 EDT 2008


 <bockman <at> virgilio.it> writes:

> >>> tasks = [ [] for x in xrange(6) ]
> >>> tasks[0].append(1)
> >>> tasks
> [[1], [], [], [], [], []]
> >>>
> 

Thanks, Bockman





More information about the Python-list mailing list