Python displays all of the prime numbers from 1 through 100
<p>I'm trying to print the all of the prime numbers from 1 through 100 by using Boolean function.</p>

<p>Below is my code that is working.</p>

<pre><code>for n in range(1,101):
status = True
if n &lt; 2:
    status = False
else:
    for i in range(2,n):
        if n % i == 0:
            status = False

    if status:
        print(n, '', sep=',', end='')
</code></pre>

<p>But when I put the code in the function and run module, there's nothing print on the shell.
What did I do wrong?</p>

<pre><code>is_prime():
    for n in range(1,101):
        status = True
        if n &lt; 2:
            status = False
        else:
            for i in range(2,n):
                if n % i == 0:
                    status = False
        return status

if is_prime():    
    print(n, '', sep=',', end='')
</code></pre>

<p>Below is the output of the program.
How do I prevent the last comma from printing?<br>
<code>2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,</code>   </p>
