def has_dup(xs):
    seen = set()
    for x in xs:
        if x in seen:
            return False
        seen.add(x)
    return True

if __name__ == "__main__":
    assert has_dup([1,2,3,1]) == True
    assert has_dup([1,2,3]) == False
    print("tests pass")
