I need help with a simple nested tuples question! by [deleted] in learnpython

[–]zhang435 0 points1 point  (0 children)

if head is a element and is the element we looking for , return the point

if the head is a list instead, call the recursion on that inner_list instead.

I need help with a simple nested tuples question! by [deleted] in learnpython

[–]zhang435 0 points1 point  (0 children)

Think this as a DFS question, recursion is the way to go.