运行cod时应出现缩进块错误

2024-06-16 08:23:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我得到以下错误:

"Expected an indented block"
  whenever I run the python script.

当我运行此代码时:

def simple():      #creating my own function named simple
print("asdadasd")

Tags: therun代码creatinganmydef错误
1条回答
网友
1楼 · 发布于 2024-06-16 08:23:36

这只是一个缩进问题:

您可以更改编辑器以使选项卡和空格可见..并删除所有带空格的选项卡 (只需查看下面的代码,在打印语句之前我已留出一些空间)

def simple():
    print("hello")

相关问题 更多 >