Question: The method customLen(L) is a recursive method that finds the length of a list L. However, it does not work correctly. Please write why,
The method customLen(L) is a recursive method that finds the length of a list L. However, it does not work correctly. Please write why, and describe the fix. def customLen (L): if L == [] : else: return 1 return 1 + customLen (L[1:])
Step by Step Solution
There are 3 Steps involved in it
The issue with the current implementation of the customLen function i... View full answer
Get step-by-step solutions from verified subject matter experts
