title: How to do logical functions on arrays in python
body: <p>Is it possible somehow to preform logical functions on arrays like eg.</p>
  <pre><code>a= [1,2,3,4,5,6]
  b= [1,3,5,7]
  c= a and b
  
  resulting in c=[1,3,5]
  </code></pre>
  <p>so only the values that are present in both the arrays.</p>
  <p>The same with or eg:</p>
  <pre><code>d = a OR b 
  
  resulting in b=[1,2,3,4,5,6,7]
  </code></pre>
  <p>Is this possible somehow in python or are there short functions for this?
  Thanks for your response</p>