Compressing text python


Please help with the task is below:

Develop a program that analyses a sentence that contains several word without punctuation. When a word in that sentence is input the program identifies all of the positions where the word occurs in the sentence. The system should not be case sensitive

If possible can you do it using the .split method.
I.e. The program returns an error if punctuation is used


Do something like this:

def word_count(sentence, filter):
    total = 0
    for char in sentence:
         if (Check Specification):
             total += 1
    return total