1、新建一个write()方法的使用.py,如图所示:
3、write()方法的作用:写入指定字符串,如图所示:
5、使用 write() 函数往 a.txt 文件中写入 "Hello Python",如图所示: