import string def printMatrix (m): R = len(m) C = len(m[0]) print "dim mat:" + str(R) + 'X' + str(C) for i in range(R): print m[i]