def has_access(user, users):
    """A list of users should look as follows: ['!deny', 'user1',
    'user2'] This means that user1 and user2 have deny access. If we
    have something longer such as ['!deny', 'user1', '!allow',
    'user2'] then user2 has access but user1 does not have access. If
    no keywords are found then it returns None if the user is in the
    list. """
    if user not in users:
        return None
    rusers = users[::-1]
    try:
        action = next(x[1] for x in enumerate(rusers) if x[1][0] == '!')
    except StopIteration:
        return None
    if action == '!allow':
        return True
    if action == '!deny':
        return False
    return False