问题描述:
Write a function to find all adverbs and their positions in a given sentence.

测试用例:
['assert find_adverb_position("clearly!! we can see the sky")==(0, 7, \'clearly\')', 'assert find_adverb_position("seriously!! there are many roses")==(0, 9, \'seriously\')', 'assert find_adverb_position("unfortunately!! sita is going to home")==(0, 13, \'unfortunately\')']

生成的代码:
def find_adverb_position(sentence):
    words = sentence.split()  # Split the sentence into a list of words
    
    for word in words:
        if word.endswith('ly'):  # Check if the word ends with 'ly'
            start_index = sentence.index(word)  # Find the starting index of the adverb
            end_index = start_index + len(word) - 1  # Calculate the ending index of the adverb
            return (start_index, end_index, word)  # Return the position and the word

# Test cases
assert find_adverb_position("clearly!! we can see the sky") == (0, 7, 'clearly')
assert find_adverb_position("seriously!! there are many roses") == (0, 9, 'seriously')
assert find_adverb_position("unfortunately!! sita is going to home") == (0, 13, 'unfortunately')