Given an array, find a duplicate and print "yes" if there is one, otherwise print "no".
Implement contains_duplicate(nums), which receives a list of integers and returns the string "yes" when any value appears at least twice, or "no" otherwise. The function may stop as soon as a duplicate is found.
def contains_duplicate(nums):