# -*- coding: utf-8 -*-
# @Time     : 2018/11/13/21:21
# @Author   : Hester Xu
# Email     : xuruizhu@yeah.net
# @File     : file.py
# @Software : PyCharm

# ls = ['good','123','xuruizhu','00000','noooo']
s = 'nihaoa'
f = open(r"D:\Project\MOOC\Python_北理1_Course\Class_demo\f.txt",'a')
# f.writelines(ls)
# f.write(s)
f.seek(0)
ad16dab00585bd2a05dbc858017a5a9fd4958517
<mask token>

<mask token>
f.seek(0)

s = 'nihaoa'
f = open('D:\\Project\\MOOC\\Python_北理1_Course\\Class_demo\\f.txt', 'a')
f.seek(0)

# -*- coding: utf-8 -*-
# @Time     : 2018/11/13/21:21
# @Author   : Hester Xu
# Email     : xuruizhu@yeah.net
# @File     : file.py
# @Software : PyCharm

# ls = ['good','123','xuruizhu','00000','noooo']
s = 'nihaoa'
f = open(r"D:\Project\MOOC\Python_北理1_Course\Class_demo\f.txt",'a')
# f.writelines(ls)
# f.write(s)
f.seek(0)