After multiple testing I have realized that
a = 1000
b = 2000
test = [ [ 0 for i in range(a) ] for j in range(b) ]
takes more time as compared to
a = 1000
b = 2000
test = [ [0] * a for i in range(b) ]
in python3. Anyone can explain why is that? Or am I missing something here?