Indentation error - python
<p>I am unsure what is wrong with my code. I am trying to write a program that finds the prime factorization of a number, and iterates through numbers. My code is </p>

<pre><code>import math 
import time

def primfacfind(n1,n2):
    while n1 &lt; n2:
        n = n1
        primfac=[]

        time_start = time.clock()

        def primes(n):
            sieve = [True] * n
            for i in xrange(3,int(n**0.5)+1,2):
                if sieve[i]:
                    sieve[i*i::2*i]=[False]*((n-i*i-1)/(2*i)+1)
            return [2] + [i for i in xrange(3,n,2) if sieve[i]]

        print primes(n)

        def factfind(lsp,n): #finds factors of n among primes
            for i in lsp:
                if n%i==0:
                    primfac.append(i)
                else:
                    i+=1

        factfind(primes(n),n)
        print primfac

        def simplify(lsp):
            for i in lsp:
                if lsp.count(i) &gt; 1:
                    i+=1 #should simplify to 3^2 instead of 3,3; unfinished

        time_end = time.clock()
        time_elapsed = time_end - time_start
        print time_elapsed

        n1+=1

print primfacfind(6,15)
</code></pre>

<p>The error given is </p>

<pre><code>Traceback (most recent call last):
  File "python", line 15
    sieve = [True] * n
        ^
IndentationError: expected an indented block
</code></pre>

<p>I've checked over my indentation again and again, and I am unsure as to what is wrong. The program worked when it was not in the overall function and while loop, but I don't see how that should make a difference. It would be appreciated if the answer code was as simple as possible to understand, as I am somewhat new to python. </p>

<p>Any help with this error would be appreciated. Thanks!</p>

<p>Download something like <a href="https://www.sublimetext.com/" rel="nofollow">Sublime</a> and highlight the code. Spaces will be dots and tabs will be dashes.</p>

python compiler-errors indentation