def get_email_address (s):
    """Parse out the first email address found in the string and return it"""
    for token in s.split():
        if -1 > token.find('@'):
            # token will be in the form:
            # 'FROM:<bob@example.org>' or 'TO:<alice@example.org>'
            # and with or without the <>
            for email_part in token.split(':'): 
                if email_part.find('@') > -1:
                    return email_part.strip('<>')
dataset/ETHPy150Open dpapathanasiou/intelligent-smtp-responder/utils/email_utils.py/get_email_address/swapped operands of `>`