python 函数
标签:name com seek 函数 python 函数 file coding pen print
#函数
def welcome():
print(‘欢迎你‘)
welcome()
def write_file(file_name,cotent):
f = open(file_name,‘a ‘,encoding=‘UTF-8‘)
f.write(cotent)
f.seek(0)
x = f.read()
print(x)
f.close()
write_file(‘a.txt‘,‘今天天气好晴朗‘)
python 函数
标签:name com seek 函数 python 函数 file coding pen print
温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/biancheng/12075.html
- 上一篇:C 内存区域
- 下一篇:Spring 框架中都用到了哪些设计模式