Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = [[1,2,3], [4,5,6], [7,8,9]]
- for row in m:
- result = sum(row)
- print(result)
- #-----------------------------------------
- m = [[1,2,3], [4,5,6], [7,8,9]]
- all_results = []
- for row in m:
- result = sum(row)
- all_results.append(result)
- print(all_results)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement