summaryrefslogtreecommitdiff
path: root/comp/work/21/mysum.py
blob: fdbb0bb2ad0b474d95eaccbcb75e8264dee64bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
nums = [[3,7,12,5],[8,4,1,6],[15,0,2,6]]

def mysum(list):
    total = 0
    for i in list:
        total = total + i
    return total


total = 0
for i in nums:
    total = total + mysum(i)

print(total)