📜  python 将文本文件读入字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:15.581000             🧑  作者: Mango

代码示例1
with open('data.txt', 'r') as file:
    data = file.read().replace('\n', '')