title: Python Duplicate words
body: <p>I have a question where I have to count the duplicate words in Python (v3.4.1) and put them in a sentence. I used counter but I don't know how to get the output in this following order. The input is:</p>
  
  <pre><code>mysentence = As far as the laws of mathematics refer to reality they are not certain as far as they are certain they do not refer to reality
  </code></pre>
  
  <p>I made this into a list and sorted it </p>
  
  <p>The output is suppose to be this</p>
  
  <pre><code>"As" is repeated 1 time.
  "are" is repeated 2 times.
  "as" is repeated 3 times.
  "certain" is repeated 2 times.
  "do" is repeated 1 time.
  "far" is repeated 2 times.
  "laws" is repeated 1 time.
  "mathematics" is repeated 1 time.
  "not" is repeated 2 times.
  "of" is repeated 1 time.
  "reality" is repeated 2 times.
  "refer" is repeated 2 times.
  "the" is repeated 1 time.
  "they" is repeated 3 times.
  "to" is repeated 2 times.
  </code></pre>
  
  <p>I have come to this point so far</p>
  
  <pre><code>x=input ('Enter your sentence :')
  y=x.split()
  y.sort()
  for y in sorted(y):
      print (y)
  </code></pre>