title: Filter/map/lambda in Python 3
body: <p>I am having some trouble with the lambda function in Python3. 
  See what I did so far.</p>
  
  <pre><code>odd_lst = []
  for n in range(len(lst)):
      if lst[n] % 2 != 0:
          odd_lst.append(lst[n]**2)
  </code></pre>
  
  <p>This is the original code. I need to replace that for loop statements with a single line code using filter() and map(). 
  I tried using the following line :</p>
  
  <pre><code>odd_lst=list(filter(lambda x: x**2 if (x%2)!=0, lst))
  </code></pre>
  
  <p>But it is giving me an error:</p>
  
  <pre><code>odd_lst=list(filter(lambda x: x**2 if (x%2)!=0, lst))
                                                ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>I am new to this concept. Please show what I'm doing wrong.</p>