python ndentationError: unexpected indent

python 缩进搞了好久,每次都自己看了没什么问题

   IndentationError: unexpected indent

  每次都是这个错误。

  后来查资料是vimrc配置有点问题

  我在写代码的时候用空格代替了tab

  python缩进太严格了

  真不习惯这种

  打开 vim vim/etc/vim/vimrc 命令

       找到: set noexpandtab

         用  "  注释掉

         在: set tabstop=4

         前面加上:set expandtab

  就可以了

你可能感兴趣的:(python ndentationError: unexpected indent)