Ok so i need to make a program that you put in an email address and it checks for the @ symbol and then makes sure its not the first digit or the last digit. Now i know that there is " like s.islower( for lowercase) and s.isupper but i dont know if theres a s.is "@"
can someone help me?
def main():
print "This program validates a email address"
email = raw_input("Enter Your email: ")
if isValid(email):
print ("That is a valid email")
else:
print ("That email is not valid.")
raw_input("\nPress <enter> to close window.")
def isValid(s):
if s.is"@"() == 0:
print "There is no @ symbol"
return False
if s.isfirst(@) == 0:
print "the @ cannot be first"
return False
if s.islast(@) == 0:
print "the @ cannot be last"
return False
return True
main()