0

Are the following two methods for creating a nested list in Python3 equivalent?

D=[[0 for _ in range(n)] for _ in range(m)]

and

D=[[0]*n]*m
martineau
  • 112,593
  • 23
  • 157
  • 280

0 Answers0