Skip to content

Instantly share code, notes, and snippets.

@jweinst1
Created July 7, 2015 07:37
Show Gist options
  • Save jweinst1/264616e2f992404dca37 to your computer and use it in GitHub Desktop.
Save jweinst1/264616e2f992404dca37 to your computer and use it in GitHub Desktop.
RecursionRangewithlist.py
def addinglist(n):
if n == 7:
return [n]
return [n] + addinglist(n+1)
"""method of using recursion to construct a range list"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment