def is_email(identifier):
 try:
  validate_email(identifier)
 except ValidationError:
  return False
 return True

def is_email ( identifier ) : try : validate_email ( identifier ) except ValidationError : return False return True
checks if an identifier string is a valid email .