• Code works on my computer, but not on here

Question related to mission Restricted Sum

 

I'm getting the correct result on my editor, but when I copy the code into checkio, it's failing checkio([2,2,2,2,2,2]). Any ideas?

v1 = 0
def checkio(data):
    if len(data)>0:
        global v1
        data_iter = iter(data)
        v1 += next(data_iter)
        data.pop(0)
        checkio(data)
    return v1
11