[Tutor] email validation

Válas Péter turtle at 64.hu
Sat Aug 1 23:03:35 CEST 2015

Hi Stephanie,

the function should be defined first, and used after. So put it before

Also, "if '@' not in email and '.' not in email:" seems to be erroneous.
You want both be present; this is an AND if you state it and becomes OR
when you deny.
if '@' not in email or '.' not in email:
In the present form your if comes true only when none of @ and . occur in
the string.

More information about the Tutor mailing list