title: TypeError: 'list' object is not callable while using lambda function
body: <p>I am trying to use lambda function with <code>filter()</code> but getting error: <code>"TypeError: 'list' object is not callable"</code>.</p>
  
  <p>My code is as below:</p>
  
  <pre><code>list1 = [1,2,3,4,5,6,7,8,9]
  newlist = list(filter(lambda a:(a%2==0), list1))
  print(newlist)
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>[2,4,6,8]
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last) &lt;ipython-input-48-139f323ff9a1&gt; in &lt;module&gt;()
        1 list1 = [1,2,3,4,5,6,7,8,9]
  ----&gt; 2 newlist = list(filter(lambda a:(a%2==0), list1))
        3 print(newlist)
  
  TypeError: 'list' object is not callable
  </code></pre>
  
  <p>Note:- If we use the command as <code>"newlist = tuple(filter(lambda a:(a%2==0), list1))"</code> we are getting output as below &amp; there is not error:</p>
  
  <pre><code>(2, 4, 6, 8)
  </code></pre>