问题 VScode 中执行python脚本报错 TabError: inconsistent use of tabs and spaces in indentation,该问题是由于代码中 看似空格实则没有空格引起的,因此在可以通过编辑器渲染出空格是否存在来看出问题; 解决方法 例如在 VScode 中,在方settings 中搜索 Render Whitespace,选项中选择 all 即可在编辑页面以 . 渲染空格;