title: convert for loop to recursion
body: <pre><code>dict = {'dict1': [['Movie1', 'Fiction'], ['Movie2', 'Romance']], 'dict2' : [['Movie3', 'Comedy']]}
  </code></pre>
  <p>I have a dictionary like shown above and I'm trying to find certain element in the value according to the user input. There will be an input from user to search certain movie from the dictionary and the output will show the name, genre, and location (key) of the movie. Let say the input is <code>&quot;Movie1&quot;</code>, then the output will be <code>&quot;Movie1&quot;</code>, <code>&quot;Fiction&quot;</code>, and <code>&quot;dict1&quot;</code>. I've solved this problem using for-loop, but now I need to do it recursively. I don't have any ideas yet to solve it recursively.</p>
  <p>This is the for-loop code that i've tried.</p>
  <pre><code>dic = {'dict1': [['Movie1', 'Fiction'], ['Movie2', 'Romance']], 'dict2' : [['Movie3', 'Comedy']]}
  
  temp = []
  
  movie_name = &quot;Movie1&quot;
  
  for key in dic :
      value = dic[key]
      for lst in value:
          for element in lst:
              if element == movie_name:
                  temp.append(element)
                  movie_key = key
  
  if movie_name in temp:
      for element in dic[movie_key]:
          if movie_name in element:
              print(f&quot;Founded in {movie_key}; Title : {element[0]} ; Genre : {element[1]}&quot;)
  </code></pre>