IndentationError:expected an indented block。

python编写时报IndentationError:expected an indented block错误,这时候该怎么办呢?下面与大家分享解决方法

方法

编写Pyt来自hon代码时会遇到expected an indented block错误

IndentationError:expected an indented block。

原因在于“:”后面的语句需要进行缩进

IndentationError:expected an indented block。

将print语句缩进后即可正确输出a的值了

IndentationError:expected an indented block。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 951076433@qq.com 举报,一经查实,本站将立刻删除。如若转载,请注明出处:https://www.xiaomafuwu.com/134902.html

(0)
代码小二的头像代码小二

相关推荐