########## Begin ##########
# 请使用 open 函数读取文件中的指定内容
f = open("src/step1/data.csv","r",encoding="utf8")
a=f.readlines()[-1]
split3 = a.split(": ");
print('文件中的数字内容为:'+str(split3[-1]))
########## End ##########
头歌-Python文件操作之文本文件的顺序读写
于 2024-02-15 01:27:36 首次发布