PyCharm中遇到TabError: inconsistent use of tabs and spaces in indentation时怎么办?

PyCharm中遇到TabError: inconsistent use of tabs and spaces in indentation时怎么办?
当使用PyCharm运行代码时出现了TabError: inconsistent use of tabs and spaces in indentation时,说明代码中混杂了空格与Tab,不想一步一步删除(在代码量大时极为繁琐),可以尝试如下的简便方法:
选择左上角菜单栏中的Code—>Reformat Code
PyCharm中遇到TabError: inconsistent use of tabs and spaces in indentation时怎么办?
感谢PyCharm的高效便捷的功能,这个小问题轻松解决!