Skip to content

Instantly share code, notes, and snippets.

@M-Barnett
Last active September 2, 2015 18:23
Show Gist options
  • Save M-Barnett/bfaf20c2d7f9ef380423 to your computer and use it in GitHub Desktop.
Save M-Barnett/bfaf20c2d7f9ef380423 to your computer and use it in GitHub Desktop.
Recursive Summation
def summation_recursion(submit_list, output = 0):
given_list = submit_list
if len(given_list) > 0:
output += given_list.pop()
summation_recursion(given_list, output)
else:
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment