https://blog.csdn.net/hanhanwanghaha宝藏女孩 欢迎您的关注!
欢迎关注微信公众号:宝藏女孩的成长日记
让这个可爱的宝藏女孩在努力的道路上与你一起同行!
如有转载,请注明出处(如不注明,盗者必究)

报错为

翻译过来是“缩进错误:需要缩进的块”
解决办法:在python中要求严格的缩进,所以在报错那一行执行严格的缩进就可以了

(更新为3月9日)
时隔这么久,我又出现这样的报错了

IndentationError:unexpected indent

如图:

做练习的时候,简直无语了,这么简单的也会错

解决缩进之后应该是

于是问题得到解决!

https://blog.csdn.net/hanhanwanghaha宝藏女孩 欢迎您的关注!
欢迎关注微信公众号:宝藏女孩的成长日记
让这个可爱的宝藏女孩在努力的道路上与你一起同行!
如有转载,请注明出处(如不注明,盗者必究)

IndentationError: expected an indented block --python报错 or IndentationError:unexpected indent相关推荐

  1. python 报错 IndentationError: expected an indented block SyntaxError: invalid character in identifie

    红色方框那里敲击一个空格就好! 输入要在全英情况下! 另外,还要注意括号的事情.括号别出错误! IndentationError: expected an indented block的报错: Syn ...

  2. Python报错“IndentationError: expected an indented block“

    问题描述: 一段python代码中使用了if name == 'main':,运行程序是报错"IndentationError: expected an indented block&quo ...

  3. python 报错:IndentationError: expected an indented block

    def get_formatted_name_0(first_name,last_name,middle_name=''):"""返回整洁的姓名""& ...

  4. Python报错:IndentationError: expected an indented block

    IndentationError: expected an indented block 直译为:缩进错误:需要缩进的块 在Python中,函数间的判定归属由缩进的块来决定而不是一组组括号 出现这个错 ...

  5. Python : IndentationError: expected an indented block

    如下图 运行包报错: IndentationError: expected an indented block 处理方法是 问题原因 1冒号后面要跟要写一些内容的, 2 其他位置,或多或少空格的位置不 ...

  6. python问题:IndentationError:expected an indented block错误解决

    原文地址  http://blog.csdn.net/neilhappy/article/details/7724959 Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有 ...

  7. 成功解决python中出现的IndentationError: expected an indented block的错误

    成功解决python中出现的IndentationError: expected an indented block的错误 目录 解决问题 解决思路 解决方法 解决问题 当在python中出现这个错误 ...

  8. python出现expected an_Python错误:IndentationError:expected an indented block怎么解决

    出现 IndentationError:expected an indented block 错误 一般是因为缩进问题引起的. 实例分析: 错误代码: >>> for key in ...

  9. IndentationError:expected an indented block错误解决

    IndentationError:expected an indented block错误解决 描述: 有时一个简单的问题会困扰很久,当发现问题后才感觉自己是多蠢,下面记录一个在日常Python编程过 ...

最新文章

  1. 【转】EventBus 3.0使用详解
  2. 没有文档,没有老员工讲解,悲催的新人如何快速熟悉一个新项目?
  3. 命令 / Linux / 常用的解压缩的命令
  4. BackTrack5汉化后打开Txt乱码解决方法
  5. golang---map类型
  6. 【假期福利】用尺子丈量宇宙:古人竟是这样理解我们的地球
  7. Canny边缘检测及C++实现
  8. 华为云PB级数据库GaussDB(for Redis)揭秘第13期:如何搞定推荐系统存储难题
  9. 使用python通过odbc处理*.dbf数据表
  10. 用信号量实现进程互斥、同步、前驱关系
  11. nginx 启动、重启、关闭
  12. c# u盘使用记录_用 C# 编写 USB 存储设备使用痕迹检测和删除工具
  13. centos7.5 挂载超过2T的大硬盘步骤
  14. html网页设计优秀作品和代码,从优秀的网页设计作品中学排版和配色
  15. PhotoShop 之移动选区
  16. [Oracle] 一个通过添加本地分区索引提高SQL性能的案例
  17. mac安装linux时触控板不能用,macbookpro上装Deepin 20.2后wifi和触摸板不可用的解决
  18. macOS_Catalina_10.15.7_19H15可引导可虚拟机安装的纯净版苹果OS系统ISO镜像安装包免费下载
  19. GitHub入门:github查看项目的历史版本,并实现版本的回滚(网页版)
  20. SMPL:数据增强之处理pose和3d点

热门文章

  1. android预加载app,Android欢迎页预加载首页数据
  2. C语言的VC开发环境界面介绍,【c语言在vc++6.0中编写界面程序】
  3. android两个java文件内容_java – 在1个请求中将多个文件从Android上传...
  4. java 教室借用管理系统_[内附完整源码和文档] 基于JAVA语言的学生选课信息管理系统...
  5. Java项目转变为Java Web项目
  6. linux下nand flash驱动工作原理,Linux驱动之Nand Flash四问,原理、工作方式都包含了...
  7. guid主分区表损坏怎么办_抹盘提示进程失败,导致Win 10无法正常开机怎么办?...
  8. PHP 继承新增,php类的扩展和继承用法实例
  9. 闪灯什么意思_开夜车被对方闪了一下是什么意思?老司机:灯语都不懂,晚上别开车...
  10. echo怎么把日志清空_shell脚本清空系统message日志