def clean_tokens(tokens, callback=lambda token: token):
    """
    >>> clean_tokens(['Hello', '3', 'P.M.'])
    ['hello', '3', 'p.m.']
    >>> clean_tokens(['Hello', '3', 'P.M.'], lambda token: token.replace('.', ''))
    ['hello', '3', 'pm']
    """
    return [callback(token.lower()) if isinstance(token, str)
            else token for token in tokens]