For example my program stores a sentence, and will then ask the user to input a word from the sentence. However is there a way i can use iterative python to print out the position of the words if it appears twice in the sentence.
sentence = (' hello im jeffery hello who are you?')
print (sentence)
word = input('enter a word from the sentence')
print (word)
split = sentence.split(' ')
if word in split:
posis = split.index()
print (posis)