Reputation: 1
Let's say I create a list containing empty lists:
ex_list = [[], [], [], [], []]
How do I append elements to the specific empty lists contained in ex_list
?
For example, I would expect that:
ex_list[0].append("a")
would return:
ex_list = [[a], [], [], [], []]
But it returns:
[['a'], ['a'], ['a'], ['a'], ['a']]
Upvotes: 0
Views: 45