Created
June 22, 2017 17:33
-
-
Save landswellsong/75513a1e536404d15735082eccbe27b1 to your computer and use it in GitHub Desktop.
null created by landswellsong - https://repl.it/IyAq/0
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 my_rec_sum(*args): | |
s=0 | |
for i in args: | |
if type(i) == list: | |
for x in i: s += x | |
else: s += i | |
return s | |
print(my_rec_sum(2,3,4,10,[3,5,7,[2,3,4]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment