Hackbright Code Challenges
Count List Recursively: Solution
« Back to Homepage
Count List Recursively
Medium
Easier
Recursion
count-recursively-solution.zip
def count_recursively(lst): """Return number of items in a list, using recursion.""" # START SOLUTION if not lst: return 0 return 1 + count_recursively(lst[1:])