原文:Python问题定位:TabError: Inconsistent use of tabs and spaces in indentation

这个错误是说你用了tab键作缩进了,因为在python不像C C 里用大括号来区分程序块,而是用缩进, 所以缩进很重要你把Tab都换成空格就好了 可以把代码放到Notepad 上,然后 勾选 视图 gt 显示符号 gt 显示空格与制表符,如果代码中显示的由最左边的箭头形式的话,说明有tab键 替换方式:在NotePad 中,点击 编辑 gt 空白字符操作 gt TAB转空格 ,即可完成全部的转化, ...

2018-03-26 23:38 0 8850 推荐指数:

查看详情

Python--报错TabError: inconsistent use of tabs and spaces in indentation

Python--报错TabError: inconsistent use of tabs and spaces in indentation 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 说明 在运 ...

Sat May 30 07:36:00 CST 2020 0 1724
python 报错 TabError: inconsistent use of tabs and spaces in indentation

python的时候如果出现如题的错误 TabError: inconsistent use of tabs and spaces in indentation 意为:制表符错误:缩进中制表符和空格使用不一致 只需要将报错提示中的代码部分中的tab 格删除然后重新打出tab或者空格 ...

Mon Feb 18 22:46:00 CST 2019 0 1198
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM