This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_word(sentence, n): | |
| # Only proceed if n is positive | |
| if n > 0: | |
| words = ___ | |
| # Only proceed if n is not more than the number of words | |
| if n <= len(words): | |
| return(___) | |
| return("") | |
| print(get_word("This is a lesson about lists", 4)) # Should print: lesson |