Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def main():
  2. SIZE = 3
  3. print("Enter a 3 by 3 matrix row by row: ")
  4. m = []
  5.  
  6. for i in range(SIZE):
  7. line = input().split()
  8. m.append([eval(x) for x in line])
  9.  
  10. print("The column-sorted list is ")
  11. sortCols(m)
  12.  
  13. def sortCols(m):
  14. result = []
  15. real = []
  16. for row in m:
  17. result.append(row)
  18.  
  19. print(result)
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement