Python告诉我,在我放置一个凹槽时,预计会有一个缩进

BLU*_*LUC 2 python block indentation

好的,这是一段脚本:

def start():  
    print "While exploring the ruins of a recently abandoned castle you stumble apon the entrance to what appears to be a dungeon. You are carrying on you a...
Run Code Online (Sandbox Code Playgroud)

我一直在收到错误

user@ubuntu:~/Documents/python$ python dungeon.py  
  File "dungeon.py", line 533  
    def start():  
    ^  
IndentationError: expected an indented block
Run Code Online (Sandbox Code Playgroud)

我知道这可能是显而易见的但是有没有人知道我做错了什么?我尝试仅使用空格和标签替换缩进,但它仍然给我这个错误.我很感激任何答案.

Mec*_*ail 5

  • 确保没有混合标签和空格以进行缩进
  • 你的字符串缺少结束语

此外,def start()实际上是在您的文件中缩进?它没有缩进这个问题,这就是Python似乎在抱怨的东西.