title: Given a list of triples, return a list with the second element of each triple (If an item is not a triple, return None for that element )
body: <p>I have to use doctest to run and check the following</p>
  
  <pre><code>&gt;&gt;&gt; extract_second([('a',3,'x'),('b',4,'y')])     
  [3, 4]
  </code></pre>
  
  <p>I was able to run this successfully using :</p>
  
  <pre><code>x[1] for x in elements
  </code></pre>
  
  <p>but the second test was not successful which is: </p>
  
  <pre><code>&gt;&gt;&gt; extract_second([('c',5,'z'),('d',6)])
  [5, None]
  </code></pre>
  
  <p>then i used the following code to work it out by a little bit research </p>
  
  <pre><code>lst=[(1,2,3),(4,5,6)]
  
  for i in lst:
      if len(i) != 3:
          print "None"
      else:
          print i[1],
  </code></pre>
  
  <p>Earlier I was able to print the output as required but brackets and comma was not included in it</p>
  
  <p>Expected outcome:</p>
  
  <pre><code>[3,4]
  [5, None]
  </code></pre>
  
  <p>Received output:</p>
  
  <pre><code>3 4
  5 None
  </code></pre>