title: List of squares in python
body: <p>I need to write a function of the first n square numbers, The sequence of squares start with 1, 4, 9, 16, 25. </p>
  
  <p>For example if the input is 16, the output will be </p>
  
  <pre><code>[1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256] 
  </code></pre>
  
  <p>This code is what I've tried, but its completely wrong. This code counts my number from 1 to 255. I have no idea what to fix</p>
  
  <pre><code>def squares(n):
      L = list(range(n**2))
      L = [num for num in L if num]
      return L
  </code></pre>