【Python】异常:IndentationError:expected an indented block

来源:互联网 发布:ubuntu怎么设置中文 编辑:程序博客网 时间:2024/05/06 06:32
问题:IndentationError:expected an indented block(预期着有一个缩进块)


原因:1)报错行需要缩进而没有缩进;2)或者缩进没有对齐


解决方法:在报错行用Tab或空格进行缩进,但要注意统一个文件中只能使用一种缩进方式
0 0