title: How to find out if a given number is in a list of lists of numbers?
body: <p>I want to make a function that finds out if a given number is in a list of lists of numbers. How do I fix the following code so that it works for a list consisting of lists?</p>
  <pre><code>lst = [[1, 2], [3, 4],[5, 6, 7]]
  num = 9
  
  def in_list_of_list(lst: list) -&gt; bool:
  
      i = 0
  
      while i &lt; len(lst) and lst[i] != num:
          i = i + 1
      return i &lt; len(lst)
      
  print(in_list_of_list(lst))
  </code></pre>