Python email slicer exercise

7 Views
Published
#Python #tutorial #course

email = input("Enter your email: ")

username = email[:email.index("@")]
domain = email[email.index("@") + 1:]

print(f"Your username is {username} and domain is {domain}")
Category
Bro Code
Tags
Python tutorial for beginners, Python course, Python tutorial
Be the first to comment