热线电话:13121318867

登录
2020-12-29 阅读量: 779
Python报错:IndentationError: unexpected indent

问:

Python报错:IndentationError: unexpected indent

image.png

答:

这是python的缩进错误,python中有严格的缩进格式要求,同一级的代码要求缩进一致,这里需要将第2个和第3个def代码块与第一个def代码块缩进对齐,以及删除print()前的空格。

image.png


91.0733
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子