IndentationError问题

问题遇到的现象和发生背景

在with open或者定义函数时均报错

用代码块功能插入代码,请勿粘贴截图
with open('data.txt', 'w') as f:
   f.write('hello world')  #文件的写操作

def func():
    print("a")
运行结果及报错内容

File "", line 2

^

IndentationError: expected an indented block after 'with' statement on line 1

你这个是缩进错误 with那里的缩进有问题