user
Tell me how would you respond to the following request.
Create a function to check if a given string contains any capital letters.

assistant
def has_capitals(s):
    for letter in s:
        if letter.isupper():
            return True
    return False