title: Python: unique words and their frequency in descending order
body: <p>I'm doing a pretty simple homework problem for a Python class involving all sorts of statistics on characters, words and their relative frequencies etc. At the moment I'm trying to analyse a string of text and get a list of every unique word in the text followed by the number of times it is used. I have very limited knowledge of Python (or any language for that matter) as this is an introductory course and so have only come up with the following code:</p>
  
  <pre class="lang-py prettyprint-override"><code>for k in (""",.’?/!":;«»"""):
      text=text.replace(k,"")
  text=text.split()
  list1=[(text.count(text[n]),text[n]) for n in range(0,len(text))]
  for item in sorted(list1, reverse=True):
      print("%s : %s" % (item[1], item[0]))
  </code></pre>
  
  <p>This unfortunately prints out each individual word of the text (in order of appearance), followed by its frequency n, <strong>n times</strong>. Obviously this is extremely useless, and I'm wondering if I can add in a nifty little bit of code to what I've already written to make each word appear in this list only once, and then eventually in descending order. All the other questions like this I've seen use a lot of code we haven't learned, so I think the answer should be relatively simple.</p>