title: How can I name elements in a list and replace them?
body: <p>I have two list and I want to check if list<code>b</code> is subordinate to list<code>a</code></p>
  
  <pre><code>a = [['1', '2'], ['2', '3'], ['1', '2', '3']]
  b = ['2', '1']
  </code></pre>
  
  <p>So I tried following code:</p>
  
  <pre><code>for element in b:
      checklist = []
      parts = element.split(',')
      for x in a:
          if set(b).issubset(set(x)) is True:
              check.append(x)
  </code></pre>
  
  <p>this works! but it will output:</p>
  
  <pre><code>[['1', '2'], ['1', '2', '3']]
  </code></pre>
  
  <p>what I want is make output like:</p>
  
  <pre><code>[1, 3] or [a, c]    -----------1 and a stand for['1', '2']；3 and c stand for['1', '2', '3']
  </code></pre>
  
  <p>because this is only a short example here(I got a more complex <code>a</code> in fact...), so I tend to use loop to make it work...any idea? Thanks！</p>