title: Python: check if one set can be created from another sets
body: <p>I have list of sets:</p>
  <pre><code>graphs = [{1, 2, 3}, {4, 5}, {6}]
  </code></pre>
  <p>I have to check if <code>input</code> set can be created as sum of sets inside <code>graphs</code>.<br />
  For example:</p>
  <pre><code>input1 = {1, 2, 3, 6} # answer - True
  input2 = {1, 2, 3, 4} # answer - False, because &quot;4&quot; is only a part of another set, only combinations of full sets are required 
  </code></pre>
  <p>In other words, there are all combinations of sets inside <code>graphs</code>:</p>
  <pre><code>{1, 2, 3}
  {4, 5}
  {6}
  {1, 2, 3, 6}
  {1, 2, 3, 4, 5}
  {4, 5, 6}
  {1, 2, 3, 4, 5, 6}
  </code></pre>
  <p>I need to know, if one of these combinations is equal to <code>input</code>.</p>
  <p>How should I correctly iterate through <code>graphs</code> elements to get answer? If <code>graphs</code> is bigger, there would be some problems with finding all the combinations.</p>