diff --git a/data.py b/data.py index 22db2ab..5266111 100644 --- a/data.py +++ b/data.py @@ -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 diff --git a/mails.txt b/mails.txt index e69de29..d98f39e 100644 --- a/mails.txt +++ b/mails.txt @@ -0,0 +1 @@ +albertoxhe08@gmail.com