def email_split_and_format(text):
 if (not text):
  return []
 return [formataddr((addr[0], addr[1])) for addr in getaddresses([text]) if addr[1] if ('@' in addr[1])]

def email_split_and_format ( text ) : if ( not text ) : return [ ] return [ formataddr ( ( addr [ 0 ] , addr [ 1 ] ) ) for addr in getaddresses ( [ text ] ) if addr [ 1 ] if ( '@' in addr [ 1 ] ) ]
return a list of email addresses found in text .