I ran into some troubles when creating a list of 3 lists. Here is the code:
>>> li = [[]]*3 >>> li [[], [], []] >>> li[0].append(1) >>> li [[1], [1], [1]]
Why is the result not [[1], [], []]?
[[1], [], []]