Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
right to the point solution in Clear category for Restricted Sum by chesse20
def checkio(data):
if len(data) == 1 : ##if theres only one object return that objects value
return data[0]
else :
data[0] += data.pop() ##remove last int and add it to the first int
return checkio(data) ##recurse the algorthim
June 29, 2019
Comments: