Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
from exceptions import MustContainAtSymbolError, NameTooShortError, InvalidDomainError possible_domains = [".com", ".bg", ".org", ".net"] while True: data = input() if data == "End": break email = data email_prats = email.split("@") if len(email_prats) != 2: raise MustContainAtSymbolError("Email must contain @") name, second_part = email_prats if len(name) <= 4: raise NameTooShortError(- "Name must be more than 4 characters") domain = f".{second_part.split('.')[-1]}" if domain not in possible_domains: raise InvalidDomainError(f"Domain must be one of the following: {', '.join(possible_domains)}") print("Email is valid")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)