python "IndentationError: unexpected indent"-错误和解决方案

python报"IndentationError: unexpected indent"

 

 

解决方法:在报错的地方,代码格式重新用tab进行缩进即可(因为 python是一种对缩进非常敏感的语言,最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分别的)
posted @ 2022-01-18 10:26  明天有盼望  阅读(3404)  评论(0)    收藏  举报