Hey guys, im new here,
Ive been learning python for the past month or two and have run into a bit of a problem.
I have read a previous post on this forum with a similar problem. There answer was to flatten the list and then search it. This approach doesn't work for me as i want to return the nested list that the search item is in. To help explain what i am getting at ill write some code that explains expected outcomes when using my search_nested function.
nested_list = [[1,2,3],[5,6,7],[9,10,11]]
search_nested (1)
[1,2,3]
search_nested (4)
'not found'
Thank you for taking your time to help me out.