打印奇数代码如下:

观察了很久但是却找不出问题。后来在网上找到了答案。是空格和制表符混合的问题。

在notepad++中显示制表符的步骤如下:

显示后代码格式如下:

将空格变为制表符后(如下)可以成功运行

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

  1. Python中出现“TabError: inconsistent use of tabs and spaces in indentation”问题的解决

    转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/82745068 本文出自[我是干勾鱼的博客] 执行Python代码时,如果出现错误 ...

  2. Python中出现“TabError: inconsistent use of tabs and spaces in indentation”原因和解决方法

    初学python,很多调试都会出现 "TabError: inconsistent use of tabs and spaces in indentation" 这个错误,看着明显 ...

  3. sublime text下 Python 问题:TabError: inconsistent use of tabs and spaces in indentation

    File "G:\ST\Python\code.py", line 52while left < right and (nums[left] == nums[left+1]) ...

  4. Python中出现“TabError: inconsistent use of tabs and spaces in indentation”

    我是直接选中报错的代码看一下,发现这个报错就是说混用了tab和4个空格造成的. 我是用的是将上面的空格复制到下面,这样子整个代码都是tab为空格的了 使用vscode的快速对齐方法 当我们选中代码并按 ...

  5. python报错TabError: inconsistent use of tabs and spaces in indentation解决方案

    记录自己踩的坑: 原因:空格键和tab键混用了!!! 解决方法:要么全部使用tab,要么全部使用4个空格,不能混用,这里时去掉的空格键,全部使用的tab键. 参考:csdn博客文章

  6. 【Python】如何解决“TabError: inconsistent use of tabs and spaces in indentation”问题

    python运行代码时,如果出现如下错误: TabError: inconsistent use of tabs and spaces in indentation 很明显,标志是Tab错误,引起这种 ...

  7. TabError: inconsistent use of tabs and spaces in indentation

    Python 编译报错: TabError: inconsistent use of tabs and spaces in indentation 编译环境: python3.5  ,操作系统 Win ...

  8. 成功解决TabError: inconsistent use of tabs and spaces in indentation

    成功解决TabError: inconsistent use of tabs and spaces in indentation 目录 解决问题 解决思路 解决方法 解决问题 TabError: in ...

  9. 让sublime text显示空格,到底是点还是横杠TabError: inconsistent use of tabs and spaces in indentation

    报错情况:TabError: inconsistent use of tabs and spaces in indentation 分析,因为前面点部分从网上复制的,后面横杠是自己写的,这种混合写法会 ...

最新文章

  1. 如何通过三视图判断立方体个数_如何看股票市盈率?怎么通过市盈率判断股票?...
  2. navicat 怎么调试存储过程_Navicat 执行存储过程
  3. 用c语言链表编写便利店零售系统,链表实现多项式求和(C语言)
  4. excel表格不够怎么添加_这个Excel表格,怎么做的这么漂亮
  5. Kube Controller Manager 源码分析
  6. java控制台输出方式,JAVA控制台输出格式
  7. c语言任意两个整数相减_大整数加减运算的C语言实现
  8. 《从零开始学Swift》学习笔记(Day 14)——字符串的插入、删除和替换
  9. [原创]如何在Windows XP 中利用监视计算机中的资源使用情况
  10. Instagram 使用 Python 的经验
  11. python学习day33 hmac模块 socketserver模块
  12. linux UVC and hardware viewer
  13. MIKE水动力笔记8_冷启动与热启动
  14. 支持向量机(Vladimir Vapnik)
  15. iptables 分析
  16. MATLAB中使用plotyy绘制双纵坐标图及坐标轴设置
  17. 四连测总结(WYL)
  18. uniCloud云开发平台简介及云函数数据库基础操作练习(新人首作,欢迎支持
  19. 防治颈椎病,别陷入误区
  20. Ubuntu 18.04配置静态IP地址

热门文章

  1. MR案例:CombineFileInputFormat
  2. XMPP iOS客户端实现三:登录、注册
  3. MVC中实现订单表和订单详细表联动新增的一种方法
  4. JS判断GridView中复选框有没有被选中
  5. 虹影图片下载器(Preview)
  6. python文件读写2
  7. UA PHYS515 电磁理论II 静电场问题3 边值问题及其解的唯一性
  8. DirectX Shader 入门学习
  9. JavaScript语句模版
  10. 文本和代码文件助手软件