title: Fastest way to split a list into a list of lists based on another list of lists
body: <p>Say I have a list that contains 5 unique integers in the range of 0 to 9.</p>
  <pre><code>import random
  lst = random.sample(range(10), 5)
  </code></pre>
  <p>I also have a list of lists, which is obtained by splitting integers from 0 to 19 into 6 groups:</p>
  <pre><code>partitions = [[8, 12], [2, 4, 16, 19], [1, 6, 7, 13, 14, 17], [3, 15, 18], [5, 9, 10, 11], [0]]
  </code></pre>
  <p>Now I want to split <code>lst</code> based on the reference <code>partitions</code>.
  For example, if I have</p>
  <pre><code>lst = [0, 1, 6, 8, 9]
  </code></pre>
  <p>I expect the output to be a list of lists like this:</p>
  <pre><code>res = [[0], [1, 6], [8], [9]]
  </code></pre>
  <p>I want the algorithm to be as fast as possible. Any suggestions?</p>