Get A Specific Word From A Sentence In Python

May 2021
string = "The quick brown fox jumps over the lazy dog."

target_word_index = 4

word = string.split(" ")[target_word_index]

print(word)
Output:
jumps
end of line