title: Array initialization in Python
body: <p>I want to initialize an array with 10 values starting at X and incrementing by Y. I cannot directly use <code>range()</code> as it requires to give the maximum value, not the number of values.</p>
  
  <p>I can do this in a loop, as follows:</p>
  
  <pre><code>a = []
  v = X
  for i in range(10):
      a.append(v)
      v = v + Y
  </code></pre>
  
  <p>But I'm certain there's a cute python one liner to do this ...</p>