You don’t return anything in the else
clause:
else:
return foo(a)
More Related Contents:
- Basics of recursion in Python
- How to do a recursive sub-folder search and return files in a list?
- How to find common elements in list of lists?
- Confusing […] List in Python: What is it?
- Generate all possible lists of length N that sum to S in Python
- Flattening a list recursively [duplicate]
- Python recursive function to display all subsets of given set
- How do I reverse a list using recursion in Python?
- Given a list of elements in lexicographical order (i.e. [‘a’, ‘b’, ‘c’, ‘d’]), find the nth permutation – Average time to solve?
- What does += mean in this context?
- What does “list comprehension” and similar mean? How does it work and how can I use it?
- Why does append() always return None in Python? [duplicate]
- Recursive function returning none in Python [duplicate]
- Convert all strings in a list to int
- Element-wise addition of 2 lists?
- Iterate over all pairs of consecutive items in a list [duplicate]
- How Big can a Python List Get?
- Python -Intersection of multiple lists?
- Python: Removing list element while iterating over list [duplicate]
- In Python, when to use a Dictionary, List or Set?
- Check if something is (not) in a list in Python
- How to find the last occurrence of an item in a Python list
- What is the inverse function of zip in python? [duplicate]
- Pandas expand rows from list data available in column
- django – convert a list back to a queryset [duplicate]
- Convert list of strings to dictionary
- Sort list of strings by a part of the string
- Create random list of integers in Python
- Why does df.apply(tuple) work but not df.apply(list)?
- Creating a dictionary with list of lists in Python