How to remove outer list?
<p>I have a simple example,
Create a program that asks the user for a number and then prints out a list of all the divisors of that number.</p>

<p>And i am solving it like this:</p>

<pre><code>n = 4
list_range = list(range(1,n+1))
divisor_list = []
divisor_list.append([i for i in list_range if n%i==0])
print divisor_list
#output:
#[[1, 2, 4]]
</code></pre>

<p>I want the output to be <code>[1, 2, 4]</code></p>

<p>I can achieve this by:</p>

<pre><code>n = 4
list_range = list(range(1,n+1))
divisor_list = []
for i in list_range:
    if n % i == 0:
        divisor_list.append(i)
print divisor_list
#output:
#[1, 2, 4]
</code></pre>

<p>But is there a better way of achieving this ?</p>