validate email python

email = input("Email to be validated: ")
accepted_emails = [test@example.org, testing@anything.com]
if email in accepted_emails:
  print("Email accepted")

Here is what the above code is Doing:
1. We’re asking the user to input an email address.
2. We’re creating a list of accepted emails.
3. We’re checking if the email inputted by the user is in the list of accepted emails.
4. If the email is in the list, we’re printing “Email accepted”.