I'm quite new to recursion and I have to solve a problem for my homeworks which asks to define a recursive function to get the next element on a given item of a list. I made the iterative version but I don't understand how to write the recursive one.
def next_value(lst,v):
ind = lst.index(v)
list1_result = lst[ind+1]
return list1_result
a = [4, 2, 10, 3, 2, 5]
print(next_value(a,10))
# output: 3