title: Python set operations - complement union of set
body: <p>I am in a Discrete Math course and am trying to replicate De Morgan's law of </p>
  
  <blockquote>
    <p>Complement(B union C) = Complement(B) intersect Complement(C).</p>
  </blockquote>
  
  <p>I tried searching for Python's ability to perform a complement on a set, but I didn't see much if anything. </p>
  
  <p>So I just tried this in IDLE. Does this appear correct?</p>
  
  <pre><code>U = {'pink', 'purple', 'red', 'blue', 'gray', 'orange', 'green', 'yellow', 'indigo', 'violet'}
  A = {'purple', 'red', 'orange', 'yellow', 'violet'}
  B = {'blue', 'gray', 'orange', 'green'}
  C = {'pink', 'red','blue','violet'}
  Comp_B = U - B
  Comp_C = U - C
  Comp_Union_BC = Comp_B.intersection(Comp_C)
  print(Comp_Union_BC)
  </code></pre>