title: Python: selecting the different elements of the intersection of the sets
body: <p>I need to check if the elements from 'a' are contained in 'b', and save in another vector the elements that are different.</p>
  
  <p>In R, I do as follows:</p>
  
  <pre><code>a &lt;- df$v1
  b &lt;- df2$v1
  c &lt;- a[!(a %in% b)]
  </code></pre>
  
  <p>How can I do the same thing in Python?
  I tried to use (a-b), but the result returned the difference of element values. I would not like that, I would like to retrieve elements that are different from 'a' to 'b'.</p>
  
  <p>Regards,
  Thaciana</p>