[Tutor] Sequential assignment to list subscripts

Антон Мухин antonmuhin@rambler.ru
Mon Nov 4 03:34:01 2002


      a = b = [0]
Since now a and b will reference to the *same* list. Therefore,

      a[0], b[0] = 7, 8

Will first set first element to 7 and later to 8. More clearly:

      a[0] = 7
      b[0]
must be 7

Hope this helps,
Anton.