03 with上下文管理
"""
@作者: egon老湿
@微信:18611453110
@专栏: https://zhuanlan.zhihu.com/c_1189883314197168128
"""
# 文件对象又称为文件句柄
# with open('a.txt',mode='rt') as f1: # f1=open('a.txt',mode='rt')
# res=f1.read()
# print(res)
with open('a.txt',mode='rt') as f1,\
open('b.txt',mode='rt') as f2:
res1=f1.read()
res2=f2.read()
print(res1)
print(res2)
# f1.close()
# f2.close()
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现