你好,这是我的python代码:
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)
当我尝试编译此代码时,我遇到了错误:produit = ijz ^ IndentationError:unindent与任何外部缩进级别都不匹配任何人都有想法吗?
3 回答
你问题中的代码是一团糟 . 这是修复缩进后的样子 .
您还可以在命令行中检查选项卡/空格的问题:
这是您需要的代码