see_if_string_starts_with_letter.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet

def main():

    email=input("Enter email address:")
    if email.startswith("@"):
        print("Sorry, an email cannot start with the @ sign")
    else:
        print("Thanks for your email address") #this is obviously not perfect validation!


main()
                    

Try it yourself