>>> m=[1,2,3] >>> m*3 [1, 2, 3, 1, 2, 3, 1, 2, 3] >>> [m]*3 [[1, 2, 3], [1, 2, 3], [1, 2, 3]] >>> >>> zero=[0] >>> [zero*3]*4 [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]
No comments:
Post a Comment