I was trying to create a list with n empty lists inside of it, but faced an interesting situation.
Firstly I tried the following:
>>> n = 3
>>> list([]) * n
[]
It creates an empty list.
After that I tried the following line, which creates an empty list, too:
>>> list(list()) * n
[]
But when I try the same with literals,
>>> [[]] * n
[[], [], []]
it gives the correct output. Can someone explain why?