Created
March 24, 2017 16:32
-
-
Save souvikhaldar/ca5f553453c7d0bb5cc9e031d4837b27 to your computer and use it in GitHub Desktop.
Sum of elements created by souvikhaldar - https://repl.it/Gcri/2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sumlist(l): | |
if l==[]: | |
return (0) | |
else: | |
return(l[0]+sumlist(l[1:])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment