.txt文件如下:
代码实现:
with open(‘F:/F/python_code/00.txt‘) as f: a = f.readlines() b = [n[:-1] for n in a] print(b)
原文地址:https://www.cnblogs.com/czz0508/p/10461405.html
时间: 2024-11-07 18:54:59
.txt文件如下:
代码实现:
with open(‘F:/F/python_code/00.txt‘) as f: a = f.readlines() b = [n[:-1] for n in a] print(b)
原文地址:https://www.cnblogs.com/czz0508/p/10461405.html