缩进错误 [英] Indentation Error

查看:143
本文介绍了缩进错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图定义一个类似于max方法的方法,但是我得到了预期缩进的错误。我不确定代码有什么问题......我需要帮助解决这个问题。

I'm trying to define a method similar to the method max but I get an error for an expected indentation. I'm not exactly sure what is wrong with the code... I need help solving this.

def biggest(a,b,c):
    def bigger(a,b):
        if a > b:
            output = a
        else:
            output = b
        if output > c:
            return output
        else:
            return c


推荐答案

你已经混合了制表符和空格。使用 python -tt 来验证。

You've mixed up tabs and spaces. Use python -tt to verify.

这篇关于缩进错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆