Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
def List_maker():
import re
email_list = []
regex= "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$"
print("welcome to the email subscriber list")
Key = "Y"
while(Key == "Y"):
email= input("\nEnter the email address you would like to add to the list.: ")
if(re.search(regex,email)):
email_list.append(email)
print("\n CURRENT EMAIL LIST : {} ".format(email_list))
print("\nDo you want to enter another email address?")
print("\nEnter: 1 for Yes, 2 for No")
yesorno= int(input())
if (yesorno==1):
Key = "Y"
elif (yesorno ==2):
Key= "N"
print("\n FINAL EMAIL LIST: {} ".format(email_list))
else:
print("\nWrong input!!")
else:
print("\nPlease enter a Valid Email address!")
List_maker()