result = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]] qq = sum(result[3])A. I can sum up all the rows using sum(). But how to sum the columns? Beside using the long method result[0][0]+result[1][0]+result[2][0]+result[3][0].
B. sum() will not work if one of the list elements is blank. Any way to resolve this?
Many thanks.
P/S
Found the answers. I should try harder n my search! Ha.
https://www.geeksforgeeks.org/python-col...sted-list/