Tuesday, November 2, 2010

Array

MyListOfCharacter = ['CM_','CS_','CB_']
for x in MyListOfCharacter:
    print x

1 comment:

El Ultimo Bastardo said...

>> xx = zeros([2,2], Float) # Recall 2nd parameter to zeros is the type
>>> print xx
[[0 0]
[0 0]]
>>> xx[0][0] = 5.3
>>> print xx
[[ 5.3 0. ]
[ 0. 0. ]]
>>> xx[1][0] = 4
>>> xx[0][1] = -10
>>> xx[1][1] = 16
>>> print xx
[[ 5.3 -10. ]
[ 4. 16. ]]
>>> print xx[1][0]
4.0