Commit e6f1471c by BellCodeEditor

save project

parent df9acd8c
Showing with 7 additions and 7 deletions
with open(r"C:\Users\铭方 曹霞\Desktop\text.txt",'r',encoding='utf-8') as file: with open(r"C:\Users\铭方 曹霞\Desktop\text.txt",'r',encoding='utf-8') as file:
#file1.write('小兰:12\n') #file1.write('小兰:12\n')
#file1.write('小丽:11\n') #file1.write('小丽:11\n')
file.write('小强:12\n') #file.write('小强:12\n')
file.write('李明:777777\n') #file.write('李明:777777\n')
a=file1.read() #a=file.read()
print(a) #print(a)
for data in file:
if '小强:12' in data:
print('gggg')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment