📜  打开文件 python 代码示例

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

代码示例6
# Open function to open the file "MyFile1.txt" 
# (same directory) in append mode and
file1 = open("MyFile.txt","a")
  
# store its reference in the variable file1 
# and "MyFile2.txt" in D:\Text in file2
file2 = open(r"D:\Text\MyFile2.txt","w+")