0

Help to understand

please help fill the blank https://code.sololearn.com/czN00778TECV/?ref=app

22nd Apr 2018, 9:21 PM
andrey
andrey - avatar
1 Answer
+ 2
return A[0]+addlist(A[1:])... Here is how the whole function works: If the list has length 1, it just returns the item in the list Otherwise it returns the item in position 0 + what will be return when we add the remaining items in the list ( meaning A[0] + addlist(A[1:]) )
22nd Apr 2018, 9:47 PM
cyk
cyk - avatar