我越来越IndentationError: unexpected indent
即使我写的代码完全按照书(http://learnpythonthehardway.org/book/ex25.html)意外缩进
我敢肯定,我正好用4个空格缩进哪来高清之后的”线所示”。
在Windows 7
这里使用Python 2.7是我在PowerShell中得到的错误:
PS C:\Users\Kiedis\python> python ex25.py
File "ex25.py", line 3
return sorted(words)
^
IndentationError: unexpected indent
和这里的前3行我的代码:
def sort_words(words):
"""Sorts the words"""
return sorted(words)
我正在使用Notepadd ++来编译我的代码,如果有问题 – 2013-02-09 11:18:32