📜  python 文件到字符串 - Python 代码示例

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

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