title: abstract functions in python without using lambda
body: <p>I just have a question. how to use abstract functions without lambda?</p>
  
  <p>say I have two list</p>
  
  <pre><code>a = [1,2,3,4,5]
  b = [2,4,6]
  </code></pre>
  
  <p>if I want to print all the elements both appear in A and B,</p>
  
  <p>with lambda:</p>
  
  <pre><code>def f():
    print reduce (list.__add__ , map (lambda x: filter (lambda y: x == y, b), a))
  </code></pre>
  
  <p>how to do it without lambda?</p>
  
  <p>i mean i'm just using helper functions instead of lambda</p>