python报错:IndentationError: expected an indented block

  1. 在使用for in语句中出现报错IndentationError: expected an indented block
    在这里插入图片描述
  2. IndentationError: expected an indented block的意思是
缩进错误: 期望一个缩进的块 
  1. 且错误的地方是出在第二行的print(i)
    在这里插入图片描述
  2. 解决这个bug就是要在错误的逻辑代码的前方加空格
    在这里插入图片描述
    在这里插入图片描述
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐