How to make a list of odd numbers using range and without if statement
<p>I am trying to learn Python with Eric Matthes's Python Crash Course. In one section of &quot;Try it yourself&quot; I have the next task.</p>
<blockquote>
<p>Use the third argument of the <code>range()</code> function to make a list of the odd numbers from <code>1</code> to <code>20</code>. Us a <code>for</code> loop to print each number.</p>
</blockquote>
<p>I tried:</p>
<pre><code>odd_numbers = []
for value in range(1,11):
    number = value % 2 = 1
    odd_numbers.append(number)
print(odd_numbers)
</code></pre>
<p>This does not work.<br />
Any way I can solve this without an if statement?</p>