title: How to create a range of numbers with a given increment
body: <p>I want to know whether there is an equivalent statement in lists to do the following. In MATLAB I would do the following</p>
  
  <pre><code>fid = fopen('inc.txt','w')
  init =1;inc = 5; final=51;
  a = init:inc:final
  l = length(a)
  for i = 1:l
     fprintf(fid,'%d\n',a(i));
  end
  fclose(fid);
  </code></pre>
  
  <p>In short I have an initial value, a final value and an increment. I need to create an array (I read it is equivalent to lists in python) and print to a file.</p>