import string


def last_int(s):
    """Return the last integer in a string, or None"""
    ret = ''
    for c in reversed(s):
        if c in string.digits:
            ret += c
        else:
            break
    if len(ret) > 0:
        return int(ret[::-1])
    else:
        return None