* 2 - , , . :
a = [1]
b = [2]
a + b
[1, 2]
, [[1], [2]] - , . .
So, in these lines it [] * 2generates a list like [], because you would also get it if you did [] + []- a list with all the elements from both lists in it, which, since both entries are empty, are also empty. And then, you put it on another list, in the end you get [[]].
Other answers already cover other ways of generating this, so I will not duplicate them.
source
share