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
Created at: 2020/03/19 19:47; Updated at: 2020/03/22 08:43
The question is resolved.