As I am new to Python and programming as a whole, I do not have extensive knowledge of how to correctly report a bug. And as such I must apologize for the inconvenience.
My lack of knowledge makes this only an assumption, but...
---
>>>l
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
>>>q = r = s = []
>>>for i in range(len(l)):
... for x in l[i]:
... q.append(x)
... s = q
... q = []
... print s, # print used to increase clarity
... r.append(s)
... print r # and the next is printed out as:
...
[1, 4, 7] [1, 4, 7, [...]]
[2, 5, 8] [1, 4, 7, [...], [2, 5, 8]]
[3, 6, 9] [1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]
>>>r
[1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]
>>>r[3] # for extra
[1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]
---
Supposed outcome for r being [[1, 4, 7], [2, 5, 8], [3, 6, 9]] |