How to get a list of numbers in a for statement
<p>I am currently trying to figure how to get numbers organized.</p>

<pre><code>def convert(temp_celsius):
    return temp_celsius * 1.8 + 32

def table(b):
    print('C        F')
    for x in b:
        print('{:10}'.format(convert(x)))

table(range(-30, 50, 10))
</code></pre>

<p>I need a list of numbers that ranges from -30 to 40 in steps of 10. So I have 2 columns. One with Farhenheit and one with Celsius. I currently only have the columns with the converted Farhenheit. </p>

<p>With two format statements:</p>

<pre><code>for x in b:
    print('{:10} {:10}'.format(x, convert(x)))
</code></pre>

<p>Certainly, you just forgot to add the other output.</p>

python for-loop