title: sort and group dict of list if list contains others
body: <p>I have a dict of lists<br>
  <code>dict = {k1:[v1],k2:[v1,v2,v3,v4,v5],k3:[v2,v3],k4[v1,v2]}</code><br>
  i want to sort dict as the next elements have previous elements e.g.  </p>
  
  <pre><code>OrderedDict = ((k1,[v1]),(k4,[v1,v2]),(k3,[v2,v3]),(k2,[v1,v2,v3,v4,v5]))
  </code></pre>
  
  <p>and sorted based on their priority:</p>
  
  <pre><code>SortedGroup = [1:((k1,[v1])),2:((k4,[v1,v2]),(k3,[v2,v3])),3:(k2,[v1,v2,v3,v4,v5]))]
  </code></pre>
  
  <p>i have tried <code>sorted(dict.items(),key = lambda x: len(x[1]))</code> but it's based on <code>len(list)</code> only not list elements. Thought about permutation but have not seen many examples with them. </p>