首页
技术文章
Python
Network
HUAWEI
Linux
Nginx
Docker
片刻
备忘录
我的相册
海报墙
友链
NonAce 那航寻
wpblog
Lan's blog
累计撰写
32
篇文章
累计创建
8
个标签
累计收到
1
条评论
栏目
首页
技术文章
Python
Network
HUAWEI
Linux
Nginx
Docker
片刻
备忘录
我的相册
海报墙
友链
NonAce 那航寻
wpblog
目 录
CONTENT
以下是
JunLan
的文章
2024-11-25
对txt文件的操作
1、逐行读取txt文件 def read_txt_file_by_line(filepath): with open(filepath, 'r', encoding='utf-8') as file: for line in file: print(l
2024-11-25
25
0
0
Python
2024-11-25
编码(unicode、gbk、utf-8)之间的转换
编码(unicode、gbk、utf-8)之间的转换 #utf-8(世界通用编码)编码的中文字符占用3个字节,gbk编码的中文字符占用2个字节 s="你好,中国!" print(s.encode('unicode-escape')) #unicode转义序列,默认是unicode编码,转换为un
2024-11-25
45
0
0
Python
1
2
3
4