Python list comprehension question?
<p>Python list comprehension </p>

<p>I have started to write some python code
What I have is :</p>

<pre><code>from math import *
def ex(N):    

    l = []
    sum = 0
    N = abs(int(N));
    for n in range(1,N):
        if N % n == 0:
            l.append(n)
            sum += n
    l.append(N) 
    print '  of '+str(N),l
    print 'SUM', (sum+N)
</code></pre>

<p>I dont know it is the <code>good or bad</code> but this is what i have tried :)</p>

<p>As I know python have list comprehension.</p>

<p>from my code .Can do with list comprehension? And how can I?</p>
