python 读取 txt;python 写入 txt; python 读取文本; python 写入文本;

    1. with open('data.txt',"r") as f:
    2. str = f.read()
    3. with open("douban.txt","w") as f:
    4. f.write("这是个测试!")