Python进阶学习笔记-应用场景篇

1、文件读写 # 写入文件 with open('example.txt', 'w') as file: file.write('Hello, World!') # 读取文件 with open('example.txt', 'r') as file: content = file.read() p
posted @ 2024-06-29 20:05  wanghongwei-dev  阅读(3)  评论(0编辑  收藏  举报