+ 2
How to do this recursive?
https://code.sololearn.com/cJjDXZ8jMhdF/?ref=app Iâm noob this is one of my first program and I donât have enough exp
1 Answer
+ 7
If the first element is equal to x, return True.
If the list is empty (because you already went through to the end), return False.
If the first element of the iterable is unequal to what you search for, you return another call of the function, with only the part of the list after the first element.
Can you do it from here? Please show us your attempt!