python代码整理(2022年4月-2024年3月)

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

PHPer 2024-03-20 151 0 0

sublime text下 Python 问题:TabError: inconsistent use of tabs and spaces in indentation_sublime inconsistent use of tabs and spaces in ind-CSDN博客


File "G:\ST\Python\code.py", line 52
while left < right and (nums[left] == nums[left+1]):
TabError: inconsistent use of tabs and spaces in indentation

怎么都搞不定,原因是自己偷懒了,从LeetCode上面复制了头部,尾部是自己手写的,方案就是全部推倒,重来,全部手写。

class Solution:
    def threeSum(self, nums):
        """
        :type nums: List[int]
        :rtype: List[List[int]]
        """

网友方案,检查subline的空格制表显示就可以清楚的显示出自己是否真的空格了。

操作:

在 text中Preferences->Settings-User中添加以下代码:

,
"draw_white_space": "all"

注意:如果你的设置里面还有其他东西,你就需要添加逗号让两个不同的设置分割开来

sublime 会显示横线和点出来 ...

立即注册
分享的网址网站均收集自搜索引擎以及互联网,非查问网运营,查问网并没有提供其服务,请勿利用其做侵权以及违规行为。

更新于:2024-03-28 23:34:10
    您需要登录后才可以评论。 立即注册
    相关内容

    python代码整理(2022年4月-2024年3月)

    Python和PHP获取百度url跳转的真实地址代码(2022年4月实测有效)

    Pip/python-如何查看已安装的包有哪些版本?如何查看某个包存在哪些版本?pip...

    用undetected_chromedriver代替selenium解决浏览器打不开网页

    sublime text下 Python 问题:TabError: inconsistent use of tabs and s...

    Sublime Text3快捷键大全

    Python的扩展和模块安装时遇到的问题整理

    windows环境下python3安装Crypto扩展

    pip install​ 报错 ERROR: Can not execute setup.py since setuptools i...

    运行python -V 报错 -bash: python: command not found

    protobuf requires Python ‘>=3.7‘ but the running Python is 3.6.5的解...

    Chrome浏览器:The request client is not a secure context and the reso...

    python的selenium的用法整理

    selenium3定位元素(包括父子,兄弟)及常见操作

    使用Selenium自动验证滑块登录

    推荐内容

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    BT磁力搜索网站汇总和找不到的资源

    什么是磁力链接,您如何使用?

    Z-Library:全球最大的数字图书馆/含打不开的解决方案/镜像

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

    【车险课堂】什么是无赔款优待系数ncd,你“造”吗?