import bao
bao.fun1("./1111.txt")
bao.fun2("./1111.txt")
def fun1(url):
with open(url, 'r', encoding='utf-8') as f1:
file1 = f1.read()
print(file1)
return
def fun2(url):
with open(url, 'rb', encoding='utf-8') as f2:
file2 = f2.read()
print(file2)
return
def fun3(url,str1):
with open(url, 'w', encoding='utf-8') as f3:
file3 = f3.write(url,str1)
print(file3)
return
def fun4(url, str1):
with open(url, 'wb', ) as f4:
file4 = f4.write(url, str1)
print(file4)
return
网友评论