def keepAlphanum(s):
    """Returns string p_s whose non-alphanum chars have been removed"""
    if s is None:
        return s
    res = ''
    for c in s:
        if c.isalnum():
            res += c
    return res
