3. 编写一个函数，输入一个字符串，返回该字符串中每个单词的首字母大写的版本。

"hello world, how are you?"
```
def capitalize_words(sentence):
    words = sentence.split()
    capitalized_words = [word.capitalize() for word in words]
    return " ".join(capitalized_words)

capitalize_words("hello world, how are you?")
# Output: "Hello World, How Are You?"
```

This function first splits the sentence into individual words using the `split()` method. It then capitalizes the first letter of each word using the `capitalize()` method. Finally, it joins the capitalized words back into a single string using the `join()` method.