给出整数数组nums,如果在数组中出现任何值至少两次,则返回true,如果每个元素是不同的,则返回false.
写一个函数,该函数执行以下操作:
Here's the function to solve the given problem in Python:

```
def contains_duplicate(nums):
    '''
    Given an integer array nums, return true if any value appears at least twice in the array,
    and return false if every element is distinct.
    '''
    return len(set(nums)) != len(nums)
```

This function uses Python's built-in `set` function to remove any duplicates from the input list. If the length of the original list is the same as the length of the set-removed list, then there aren't any repeats, and the function returns `False`. However, if the lengths are different, then there is at least one duplicate, and the function returns `True`.