title: Count the depth of a specific element in a nested list
body: <p>I am trying to figure out how to get the count of certain element's level in a nested list.</p>
  <pre><code>my_list = [&quot;a&quot;, [&quot;b&quot;, [&quot;c&quot;, &quot;d&quot;], &quot;e&quot;], &quot;f&quot;, [&quot;g&quot;, [&quot;h&quot;]]]
  </code></pre>
  <p>To get the level of the element &quot;e&quot;, I've tried to make a function for recursion but failed...</p>
  <pre><code>def get_level(letter, my_list):
      cnt = 0
      for sub_list in my_list:
          if letter in sub_list:
              cnt += 1
              return cnt
          else:
              get_level(letter, sub_list)
  
  letter = &quot;e&quot;
  print(get_level(letter, my_list))
  </code></pre>
  <p>The result should be <code>2</code>.</p>
  <p>Please let me know if there is any way for it.</p>