Python – IndentationError: unindent does not match any outer indentation level python

ipythonpythonpython-2.7python-3.xwxpython

Hello here is my python code:

def is_palindrome(nombre):
    if str(nombre) == str(nombre)[::-1]:
        return True
    return False
x = 0
for i in range(100, 1000):
    for j in range(i, 1000):
        for z in range(j, 1000):    
 produit = i*j*z

        if is_palindrome(produit):
            if produit > x:
                x = produit
print(x)

When I tried to compile this code I have got that error:
produit = ijz
^
IndentationError: unindent does not match any outer indentation level
Anyone has an idea please??

Best Answer

You can check for problems with tabs/spaces also in command line:

python -m tabnanny -v yourfile.py