• Not same result as my interpreter



Please give a look at the following code :

total = 0

def checkio(data):
    if data:
        global total
        total += data.pop()
    return total

On my interpreter (python 3.x), the result for the second test "print(checkio([2,2,2,2,2,2]))" give the result 12.

But your checking algorithm say that my output is 16 and that the correct score is 12.

Can you please give a check on this ?