title: How quickly identify duplicate numbers in the list with dictionaries
body: <p>I have a little question about searching same numbers.</p>
  <p><strong>What I have:</strong></p>
  <p>I have a list with dictionaries. In this dictionaries there are 2 pairs key-val, one is unique id and other is list with numbers.</p>
  <p><strong>What I need to do:</strong></p>
  <p>I need to define <strong>if there is any same number in other lists in other dicts</strong> and write <code>parent</code> id and this same number in the <code>processed_data</code> dictionary. But I have very large <code>all</code> list and this processing will take around 3.6 days.</p>
  <p><strong>So here is a question</strong></p>
  <p>I want to find any other methods to process it faster, for about 12 hours if possible and would be thankful for any help.</p>
  <p>PS (Maybe some multiprocessing or threading will help somehow, but I got big doubts about if it is possible)</p>
  <p>(Let's omit here situations when it iter the same dict &amp; its list and find same number)</p>
  <pre><code># List with dictionaries:
  all = [
         {'id' : 0, 'numbers' : [1, 2, 3, 4, 5]},
         {'id' : 1, 'numbers' : [5, 7, 9]},
         {'id' : 2, 'numbers' : [10, 12, 14]},
         {'id' : 3, 'numbers' : [3, 12, 5]}
  ]
  
  # Here I will store the results
  processed_data = {}
  
  # For every row
  for every in all:
  
      id = every['id']
      numbers_list = every['numbers']
  
      for every_2 in all:
          numbers_list_2 = every_2['numbers']
  
          # If number exists in the other row
          # I remember id of the list which contains this number
          # And number
          for number in numbers_list_2:
              if number in numbers_list:
                  processed_data[id] = number
  
  print(processed_data)
  </code></pre>
  <p>Expected output:</p>
  <pre><code>{0: 5, 1: 5, 2: 12, 3: 5}
  </code></pre>