由于初学python各种不舒服,最不舒服的还是强制要求缩进

原因:Python语法强制要求空格,此种情况是空格问题,如下图所示:

IndentationError: unexpected indent
这段代码中def函数没有顶格因此报如下错误:
IndentationError: unexpected indent
解决方式:调整缩进
IndentationError: unexpected indent
Ubuntu sublime3 Python环境搭建

相关文章:

  • 2022-12-23
  • 2021-05-19
  • 2021-08-16
  • 2022-12-23
  • 2021-08-11
  • 2021-07-24
  • 2022-12-23
  • 2021-07-06
猜你喜欢
  • 2021-08-18
  • 2021-05-19
  • 2021-09-01
  • 2021-11-09
  • 2021-11-24
相关资源
相似解决方案