Created
July 7, 2015 07:37
-
-
Save jweinst1/264616e2f992404dca37 to your computer and use it in GitHub Desktop.
RecursionRangewithlist.py
This file contains 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 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