python 报错 inconsisitent use of tabs and spaces in indentation

报错原因

同一个函数里面 既有 空格 又有 tab
箭头为tab 点为 空格

第一种:同一行中既有 空格 又有 tab

python 报错 inconsisitent use of tabs and spaces in indentation

第二种:同一个函数中既有 空格 又有 tab

同一个函数的缩进应该一致
python 报错 inconsisitent use of tabs and spaces in indentation

同一个函数的缩进应该一致,不一致的时候,linux运行会报错

notpad++ 查看 空格 和 tab

python 报错 inconsisitent use of tabs and spaces in indentation
空格和tab显示如图:空格为 点 tab 为箭头
python 报错 inconsisitent use of tabs and spaces in indentation

pycharm 显示 空格 和 tab

python 报错 inconsisitent use of tabs and spaces in indentation
空格 和 tab 显示如图:空格为点 tab 为箭头
python 报错 inconsisitent use of tabs and spaces in indentation