【发布时间】:2014-12-14 13:30:35
【问题描述】:
我是 Python 新手,我的问题是当我想在终端 (mac) 的定义函数中编写第二行时,然后我按 Enter 但它会运行而不是使用此符号 (...) 转到第二行
>>> def test():
... print "this a test"
File "<stdin>", line 2
print "this a test"
^
IndentationError: expected an indented block
>>>
我必须按哪个键...!? 抱歉,我知道这是个很愚蠢的问题,但这是我的问题。
【问题讨论】:
-
制表符?空格键?应该有大量的教程描述如何使用命令行 python。
标签: python function python-2.7 terminal user-defined-functions