python运行提示IndentationError: unexpected indent

运行一个py脚本报错:IndentationError: unexpected indent,看了看代码缩进没有问题,上网查了下应该是Tab键与空格混用的原因。

打开编辑器设置显示空格,将空格用Tab代替,再次运行脚本,错误消失。

如何让编辑器显示空格?

我用的编辑器是sublime 3,点击首选项->设置用户-> 将"draw_white_space": "all", 放入配置中即可

python运行提示IndentationError: unexpected indent