try:
with open("dns.txt", mode='r', encoding='utf-8')as FileObj:
FileObj:
print(f.read())
print(f.name)
print(f.mode)
except Exception as arg:
print("error as:",arg)
finally:
print("final code executed")
执行上面的代码,我遇到缩进错误。...我调整了空格,但尝试了但没有用,任何人都可以就这个问题帮助我。.谢谢