title: Getting a specific key and value from a list of dictionaries
body: <p>So I have this list of dictionaries:</p>
  
  <pre><code>l = [{'COUNTRY': 'UK', 'STUDENT': 'JOHN'}, {'COUNTRY': 'PT', 'STUDENT':'PEDRO'}, {'COUNTRY': 'UK', 'STUDENT': 'KYLE'}, {'COUNTRY': 'IT', 'STUDENT':'PIRLO'}, {'COUNTRY': 'PT', 'STUDENT':'ANA'}, {'COUNTRY': 'FR', 'STUDENT':'VITO'}, {'COUNTRY': 'FR', 'STUDENT':'LOUIS'}]
  </code></pre>
  
  <p>I need to make a bar chart with the x axis being the countries that are on the list and and y axis being the number of times each country appears. My idea was to 'extract' those countries to a list, like this:</p>
  
  <pre><code>country_list = ['UK','PT','UK','IT','PT','FR','FR']
  </code></pre>
  
  <p>Then I would have to count how many times does each country appears and sort the list by frequency. </p>
  
  <p>After all that is done I would have two lists:</p>
  
  <pre><code>country = ['UK','PT','FR','IT']
  
  frequency = [2,2,2,1]
  </code></pre>
  
  <p>With these two lists I would be able to make the bar chart. How can I get those two lists from the original list of dictionaries? </p>