资讯

它们是使用 with 语句实现的。 with open ("file.txt", "w") as file:file.write ("Hello, World!")# File is automatically closed after exiting the block.