Why am I getting an "int is not callable" TypeError with this (python) code?
<p>I'm doing Project Euler's problem 30, which is to find the sum of all the numbers that can be written as the sum of fifth powers of their digits. (<a href="http://projecteuler.net/problem=30" rel="nofollow">http://projecteuler.net/problem=30</a> for more information.)</p>

<p>For some reason, I'm getting an "int is not callable" TypeError when I try to run my attempted solution:</p>

<pre><code>def problem30():
    sum = 0
    for n in xrange(20000):
        if sum([((int(x))**5) for x in list(str(n))]) == n:
            sum += n
    sum
</code></pre>

<p>Why am I getting such an error, and how might I fix it? Thanks in advance.</p>
