python IndentationError: expected an indented block
来源:互联网 发布:org.apache.http.impl 编辑:程序博客网 时间:2024/05/21 22:41
>>> a=[1,2,3,4,5]
>>> a
[1, 2, 3, 4, 5]
>>> for i in a :
... print i
File "<stdin>", line 2
print i
^
>>> a
[1, 2, 3, 4, 5]
>>> for i in a :
>>> a
[1, 2, 3, 4, 5]
>>> for i in a :
... print i
File "<stdin>", line 2
print i
^
IndentationError: expected an indented block
刚开始学python用for循环时就撞墙,感觉自己的代码和书上的完全是一样的,结果就是报expected an indented block错误,偏偏英语有不好,就是没看懂这段话。唉被催呀。后来一百度才知道是缩进问题。其实就是for循环下一句忘记了按tab建。
>>> a
[1, 2, 3, 4, 5]
>>> for i in a :
... print i
python继续中。。。。
0 0
- python:IndentationError:expected an indented block
- python IndentationError: expected an indented block
- Python问题-IndentationError: expected an indented block
- 【Python】异常:IndentationError:expected an indented block
- python错误:IndentationError:expected an indented block
- python:IndentationError:expected an indented block
- python IndentationError: expected an indented block
- Python 错误:IndentationError: expected an indented block
- Python错误:IndentationError: expected an indented block
- python:IndentationError:expected an indented block问题
- IndentationError:expected an indented block
- IndentationError: expected an indented block
- Python常见问题解决办法之:python indentationerror:expected an indented block
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- Cocos2d-x精灵,上下跳动,设置比例,旋转,扭曲,透明度
- Maven使用教程
- C++中的类型强制转换
- Gitlab 503 错误
- js字符串截取
- python IndentationError: expected an indented block
- Linux中Run level的运行级别
- DirectShow学习笔记总结
- shell的条件测试
- 五种常见的PHP设计模式
- javadoc的使用及eclipse生成
- 内核watchdog
- VSTO调试
- 日常工作问题总结(三十二)shellExecute、shellExecuteEx、WinExec、CreateProcess的区别