python 中出现 “IndentationError: expected an indented block” 问题
python 学习
在定义Python函数的时候如下
>>>def hello()
. . .print "hello"这样会报错的,报错如下:
IndentationError: expected an indented block
其实是空格的问题,需要在 print"hello"之前加空格!
哈哈
python 中出现 “IndentationError: expected an indented block” 问题的更多相关文章
- python问题:IndentationError:expected an indented block错误解决《转》
python问题:IndentationError:expected an indented block错误解决 标签: python语言 2012-07-07 17:59 125145人阅读 评论( ...
- [转]python问题:IndentationError:expected an indented block错误解决
分类: python学习笔记2012-07-07 17:59 28433人阅读 评论(4) 收藏 举报 python语言 原文地址:http://hi.baidu.com/delinx/item/17 ...
- python问题:IndentationError:expected an indented block错误解决
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- python问题:IndentationError:expected an indented block
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- python中IndentationError: expected an indented block错误的解决方法
IndentationError: expected an indented block 翻译为IndentationError:预期的缩进块 解决方法:有冒号的下一行要缩进,该缩进就缩进
- Python问题1:IndentationError:expected an indented block
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- IndentationError : expected an indented block
IndentationError:在python的条件语句出现 expected an indented block问题 是指缩进问题,比如for循环里面的print前面需要四个空格. Python语 ...
- IndentationError:expected an indented block错误解决
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- IndentationError: expected an indented block错误
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
随机推荐
- python进阶——进程/线程/协程
1 python线程 python中Threading模块用于提供线程相关的操作,线程是应用程序中执行的最小单元. #!/usr/bin/env python # -*- coding:utf-8 - ...
- js踩过的一些坑
参考我的博客:http://www.isedwardtang.com/2017/08/29/js-bug/
- sublime text3 破解, 中文乱码支持, 设置
1. 激活 菜单: Help -> Enter License, 弹出对话框输入激活码确认(Use License):如下图:. 激活码: ----- BEGIN LICENSE ----- A ...
- filter方法解析
filter一般用于将数组中的某些元素过滤掉,并生成一个新的数组 基本语法如下: var newArray= arrayObj.filter(functionObj); newArray 根据过滤条件 ...
- 配置Nginx反向代理服务器
一.主要配置文件:/etc/nginx/nginx.conf 内容如下图 扩展配置文件:/etc/nginx/conf.d/*.conf 图中的主配置文件的末尾,加载所有扩展配置文件里面以.conf结 ...
- fabric查看本地与远程主机信息
#!/usr/bin/pythonfrom fabric.api import *env.user='root'env.hosts=['172.10.224.183','172.10.224.132' ...
- LeetCode——Detect Capital
LeetCode--Detect Capital Question Given a word, you need to judge whether the usage of capitals in i ...
- 网络数据包头部在linux网络协议栈中的变化
接收时使用skb_pull()不断去掉各层协议头部:发送时使用skb_push()不断添加各层协议头部. 先说说接收: * eth_type_trans - determine the packet' ...
- Android解决软键盘弹出将布局顶到上面
有时候我们在下面的布局是一个RadioGroup,然后当页面中的EditText获得焦点的时候,会将地步的RadioGroup顶起来,这时候我们只需要在AndroidMainfest中RadioGro ...
- Javascript -- 示例:多选下拉选框
1. 示例:多选下拉选框 <html> <head> <meta http-equiv="Content-Type" content="te ...