Question: Using the split string method from the preceding lesson, complete the get _ word function to return the { n } th word from a

Using the "split" string method from the preceding lesson, complete the get_word function to return the {n}th word from a passed sentence. For this example, run the print statements one at a time. Delete the other 3 print statements to do this. For example, get_word("This is a lesson about lists", 4) should return "lesson", which is the 4th word in this sentence. Hint: remember that list indexes start at 0, not 1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!