Has a duplicate, fast

Write has_duplicate(items) that returns True if any value appears in items more than once, and False otherwise.

has_duplicate([1, 2, 3, 2])  ->  True
has_duplicate([1, 2, 3])     ->  False
has_duplicate([])            ->  False

The point is to practise doing this in one pass. One of the checks hands you sixty thousand items. Comparing every pair is nearly two billion steps and will not finish inside the ten-second limit; a set makes it one loop.

def has_duplicate(items):
    ...