title: How can I convert a list of lists to a dictionary whose keys are integers and values are the index of the sublist to which the integer belongs?
body: <p>I have a list of lists, where each integer 0..N belongs to exactly one list within the outer list. So for example, if N=6, I have something like</p>
  
  <pre><code>L=[[0,4,5],[2,3],[1,6]]
  </code></pre>
  
  <p>I want the dictionary to look like the following:</p>
  
  <pre><code>{0:0, 1:2, 2:1, 3:1, 4:0, 5:0}
  </code></pre>
  
  <p>For example, the key:value pair 2:1 indicates 2 belongs to L[1]. </p>
  
  <p>Is there a simple way to do this?</p>