编写一个Python函数，该函数接受一个字符串并返回该字符串中每个单词的首字母。


my_string = "This is a test string"
```python
def first_letters(string):
    """Return the first letter of each word in a string"""
    return ''.join([word[0] for word in string.split()])

my_string = "This is a test string"
print(first_letters(my_string))  # Output: "Tiats"
```

Explanation: The `first_letters` function takes a string and splits it into individual words using the `split()` method. It then extracts the first letter of each word using a list comprehension and joins the resulting list of first letters into a single string using the `join()` method. The function returns this string of first letters. Finally, the function is called with the `my_string` variable and the output is printed to the console.