You're building a tiny search index for a list of sentences. Sentences are numbered from 1.
Write word_index(sentences). It returns a dictionary of word → list of sentence numbers that contain it.
word_index(sentences)
1def word_index(sentences):2 # your code here3 pass4