human
how to capaitalize the first letter in each word.
assistant
Here is a Python function to capitalize the first letter in each word

import re

def capitalize_first_letter(string):
    """Capitalizes the first letter in each word."""
    return re.sub(r'(?<!^)([A-Z])', r'\1', string)

# Enter the string
string = "Hello world!"

# Calling the function
print((capitalize_first_letter(string)))

#Example Output
# Hello world!

#Remember to inspect code for bugs.