def first_letter(sentence): words = sentence.split() first_letters = [word[0] for word in words] return ''.join(first_letters) sentence = "This is a sample sentence." print(first_letter(sentence))