title: Is this code for a for loop odd numbers generator in python valid?
body: <pre><code>a = 0
  for a in range(1,99):
    a = (a + 2)
    y = a
    print(y)
  </code></pre>
  <p>This is the code I used to try and generate odd numbers between 1 to 99.However it does not show any results. The problem is ,I wanna keep the same structure of the code , with any problems in it being rectified and I might want to add to it but I dont wanna write new code altogether as I might not understand it due to me being new at Python. Thanks in advance guys.</p>
  <p>PS - The problem I get in this is that it prints all the numbers in the range instead of only odd ones.</p>
  <p>Edit : 31/03/21 : Thanks to all of the people who helped me with the solution :D I asked this question when I was way younger so I apologise if it sounds really weird :D</p>