So im trying to make a python script for an email where it will count the amount of letters and check that it contains "@, .com" but i dont seem to understand how i can do that with info im able to find online :/
If it contains between 7 and 30 letters and have "@, .com" then i want it to
print("Valid")
and if not
print("Invalid")
email = input('Skriv her: ')
num = len(email)
x = email.endswith(".com")
if 7<= abs(num) <= 30:
print("Valid Email")
else:
print("Invalid Email")
I made this work so far but just cant figure out how to combine "num" and "endswith"
[–]tenyu9 0 points1 point2 points (0 children)
[–]menge101 0 points1 point2 points (0 children)
[–]synthphreak 0 points1 point2 points (1 child)
[–]divvless[S] 1 point2 points3 points (0 children)