首页 > 编程语言 > 详细

python错误提示“TabError: inconsistent use of tabs and spaces in indentation”

时间:2017-07-03 17:01:49      阅读:4813      评论:0      收藏:0      [点我收藏+]

 在遍历打印10以内的奇数是出现“TabError: inconsistent use of tabs and spaces in indentation”的错误提示:

技术分享

代码如下:

 技术分享

第一感觉没什么错误,但是当我设置显示“空格与制表符”时候,问题出现了,在第4、5行前由制表符,如图所示:

技术分享

 

在if和continue前有制表符,所以执行的时候会提示“TabError: inconsistent use of tabs and spaces in indentation”

解决问题重新运行,结果OK。

技术分享

亲测好使。。。

 

python错误提示“TabError: inconsistent use of tabs and spaces in indentation”

原文:http://www.cnblogs.com/zjiacun/p/7111915.html

(0)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!