>>> a = [[]]*10
>>> a
[[], [], [], [], [], [], [], [], [], []]
>>> a[0]
[]
>>> a[0].append([1,2])
>>> a
[[[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]], [[1, 2]]]
>>> b = [[] for _ in range(10)]
>>> b
[[], [], [], [], [], [], [], [], [], []]
>>> b[0].append([1,2])
>>> b
[[[1, 2]], [], [], [], [], [], [], [], [], []]
Why the first nested list('a') append list at every index? What I'm missing here?