Modify function to use list comprehision in Python
<p>I have got a function:</p>

<pre><code>def euler9():
    for b in range(1, 500):
        a = (500000 - 1000 * b) / (1000 - b)
        if a % 1 == 0:
            print(b * a * (1000 - a - b))
</code></pre>

<p>And I want to make it in one line like</p>

<pre><code>x*x for x in range(1,1)
</code></pre>

<p>This is what I have done:</p>

<pre><code>def euler9():
    print([b * a * (1000 - a - b) for b in range(1, 500) for a in (500000 - 1000 * b) / (1000 - b) if a % 1 == 0])
</code></pre>

<p>but I do not know what am I doing wrong. I have got an error:
TypeError: 'float' object is not iterable</p>