title: Can you search for how many times a words occurance appears in a sentence and give both positions of the words?
body: <p>I have been trying to find a single word in a sentence and show its position. with the following:</p>
  
  <pre><code>sentence= input("Write a sentence with two words the same: ")
  findme = input("Type a word that appears twice: ")
  words = sentence.split()
  print (list(enumerate(words)))
  print ("The length of sentnce in chracters is",len(sentence))
  t = words
  print("third word in sentence is:", t[2]) 
  if sentence.find(findme)!=-1:
      print("found word")
  else:
      print("word not found")
      print (sentence.find(findme))
      numberofwords = len(t)
      print("The amount of words in the sentence is:",numberofwords,"words.")
      print("This is the last time",findme,"is found in the sentence, its at",sentence.rfind(findme))
      print (sentence.index(findme))
  
  test_words = sentence.split()
  position = test_words.index(findme)
  position = position +1
  
  
  if position == 1:
      addtoword = "st"
  elif position == 2:
      addtoword = "nd"
  elif position == 3:
      addtoword = "rd"
  elif position &gt;=4:
      addtoword = "th"
  
  print ("The word",findme,"is the",position,addtoword,"and     position",position,"word in the sentence.")
  
  print ("The word",findme,"appears",sentence.count(findme),"times in the     sentence provided.")
  </code></pre>
  
  <p>But I want to simplify and display the location of the repeated word for example
  in " The cat sat on the mat with another cat."  would return " The word Cat occurs 2 times, once at 2nd position then at 9th position.</p>