diff --git a/NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 b/NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 deleted file mode 100644 index f5611fcf..00000000 Binary files a/NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 and /dev/null differ diff --git a/emailvalidator.py b/emailvalidator.py new file mode 100644 index 00000000..b3b56c2a --- /dev/null +++ b/emailvalidator.py @@ -0,0 +1,29 @@ +def validate_email(email): + email = email.strip().lower() + + if email.count("@") != 1: + return False + + username, domain = email.split("@") + + if not username or not domain: + return False + + if "." not in domain: + return False + + if ".." in email: + return False + + if domain.startswith(".") or domain.endswith("."): + return False + + return True + + +email = input("Enter email: ") + +if validate_email(email): + print("Valid email") +else: + print("Invalid email") \ No newline at end of file