From 2121a54130d148e586a54c24eb7c512dfebafdae Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 4 Jun 2022 19:02:03 +0800 Subject: [PATCH] save project --- sum.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sum.py b/sum.py index d8eaf6b..9eac1cb 100644 --- a/sum.py +++ b/sum.py @@ -2,4 +2,10 @@ sml=open(r'D:\江\k.txt','w',encoding='utf-8') sml.write('hhh:114514本\nhs:114514本\nkjah\n') sml=open(r'D:\江\k.txt','a',encoding='utf-8') sml.write('hjhj:32454\n') -sml.close() \ No newline at end of file +sml=open(r'D:\江\k.txt','r',encoding='utf-8') +for i in sml: + i="hjhj:32454\n" + if i in sml: + print('yes') + else: + print('no') \ No newline at end of file -- libgit2 0.25.0