Computer Science, asked by naveenkumar007, 10 months ago

write a python program if a number n will be given as input . followed by n mail addresses .few of the mail address might be wrong,the.output should be contain valid mail.addresses. plz explain me clearly with example​s.​

Answers

Answered by AnonymousGhost
1

Answer:

Okay so i guess this is the right answer for your question,

==================================================================

n = int(input("Enter the total number of Emails:")

emails = []                       #a list that will have all the entered emails.

for i in range (n):

    emails = str(input("Enter an Email Address:"))  # get emails from the user

for email in emails:         # iterateing through all the individual email addrs              

   if "@" not in email and "." not in email:   # checking if its valid Email

       emails.remove(email)

print(emails)

==================================================================

   

Explanation:

I am not too sure if this code will work if you just copy and paste it cuz i haven't tried it yet. But this will be the idea, try fixing the syntaxes if errors pop up .

Note* You will get better answers for these kind of questions @ stackoverflow.com

Similar questions