Blog Archive

Showing posts with label Vectors. Show all posts
Showing posts with label Vectors. Show all posts

Friday, September 21, 2012

Manipulating Sets of Repeating Numbers

>>> 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]]