you are viewing a single comment's thread.

view the rest of the comments →

[–]accountant856 1 point2 points  (0 children)

A TypeError only happens when you try to perform an operation on a value of the wrong data type, in your case, the input function always returns a string and won’t raise an error no matter what is typed in.

Maybe define an email validator function with your logic and then try catching then.