Simple List division problem
Dustan
DustanGroups at gmail.com
Sat Jan 12 18:08:18 EST 2008
On Jan 12, 2:25 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> marcstuart <marc.stuart.ris... at gmail.com> writes:
> > what I would like to get is 3 sublists
>
> > print z[0] = [1,2,3]
> > print z[2] = [4,5,6]
> > print z[3] = [7,8,9,10]
>
> Are you SURE you want that? In almost every situation I've seen,
>
> print z[0] = [1,2,3]
> print z[2] = [4,5,6]
> print z[3] = [7,8,9]
> print z[4] = [10]
>
> is preferable.
Even more preferable is:
print z[0] = [1,2,3]
print z[1] = [4,5,6]
print z[2] = [7,8,9]
print z[3] = [10]
More information about the Python-list
mailing list