Skip to content
Permalink
Browse files
push
  • Loading branch information
xhebexhiua committed Apr 6, 2021
1 parent b104ffe commit 4e98042456ed1f8e9260ec2e1f9f5c4ec58dc9c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -10,10 +10,10 @@ def check_mail(mail):#check the email if there is in file
# # https://www.codegrepper.com/search.php?q=how%20to%20find%20string%20in%20text%20file%20using%20python

def write_mail(mail):#check if email these is in file
there_is_mail=False#when we start the research do not know if the email there is in the file txt
there_is_mail=False# when we start the research do not know if the email there is in the file txt
file=open("mails.txt","r")# name of the file ,the reason why we need to open. r is means read
with open('mails.txt') as f:# open the file as "f"
if mail in f.read():#checking for email
if mail in f.read():# checking for email
there_is_mail=True# is means we found the email
#I would like to thank the following site for the help it provides me
# https://www.codegrepper.com/search.php?q=how%20to%20find%20string%20in%20text%20file%20using%20python
@@ -22,7 +22,7 @@ def write_mail(mail):#check if email these is in file
File = open("mails.txt", "a")#name of the file ,the reason why we need to open. a is means append
File.write(mail+"\n")#write emails in file txt and spece for next email
File.close()# close the file
there_is_mail=True#is means we wrote the email
there_is_mail=True# is means we wrote the email
return there_is_mail# return what happened to the email
#I would like to thank the following site for the help it provides me
# https://www.codegrepper.com/search.php?q=write%20line%20in%20text%20file%20python
@@ -0,0 +1 @@
albertoxhe08@gmail.com

0 comments on commit 4e98042

Please sign in to comment.