For this specific example, you can use this list comprehension
# assumes all rows have same number of columns
# changes the structure of table
transpose = [[row[i] for row in table] for i in range(len(table[0]))]
# store sum of transpose[-2] and transpose[-1] in total
total = [sum(transpose[i]) for i in range(-2,0)]
You will have to change the second line of code according to your needs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…