Generate a program in python to capitalize the first letter of each word in a string.
my name is john
def capitalize(string):
    words = string.split()
    capitalized_words = [word.capitalize() for word in words]
    return " ".join(capitalized_words)