title: Squaring all elements in a list
body: <p>I am told to </p>
  
  <p>Write a function, square(a), that takes an array, a, of numbers and returns an array containing each of the values of a squared.</p>
  
  <p>At first, I had</p>
  
  <pre><code>def square(a):
      for i in a: print i**2
  </code></pre>
  
  <p>But this does not work since I'm printing, and not returning like I was asked.
  So I tried</p>
  
  <pre><code>    def square(a):
          for i in a: return i**2
  </code></pre>
  
  <p>But this only squares the last number of my array. How can I get it to square the whole list?</p>