I have a problem with my program and I'm not sure what I am doing wrong. To start, I created an empty list of lists. For example:
>>> Lists = [[]]*12
which gives:
>>> Lists [[], [], [], [], [], [], [], [], [], [], [], []]
However, when you try to add a value to a separate sublist, it adds the value to all sublists. For example:
>>> Lists[2].append(1)
gives:
>>> Lists [[1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]]
Is there a way to add only one sublister so that the result looks like this:
>>> Lists [[], [], [1], [], [], [], [], [], [], [], [], []]