rows and columns in matrix python