When I try this code:
data = [[None]*5]*5
data[0][0] = 'Cell A1'
The value of data ends up like:
[['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None]]
Why does the 'Cell A1' value appear in every nested list?
This makes a list with five references to the same list:
Use something like this instead which creates five separate lists:
Now it behaves as expected: