title: Build a Bar Chart from a List of Tuples - Python
body: <p>I need to build a bar chart from the list of tuples that I have got with key names as labels for each bar shown on the x axis, and values as heights of the bars. 
  Here is how my input looks like:</p>
  
  <pre><code>top20 = [('Blues', 2008), ('Guadeloupe', 1894), ('Yorkshire', 1216), ('Monterrey', 1112), ('Government', 1081), ('Algeria', 972), ('Rotterdam', 920), ('Sardinia', 913), ('Mac OS', 864), ('Coffee', 858), ('Netherlands', 849), ('Oklahoma', 829), ('Tokyo', 817), ('Boating', 801), ('Finland', 765), ('Michigan', 737), ('Tamaulipas', 733), ('Croatia', 722), ('Kagoshima', 701), ('Isuzu', 678)]
  </code></pre>
  
  <p>Here is the code I am currently using:</p>
  
  <pre><code>plt.bar(range(len(top20)), top20.values(), align='center')
  plt.xticks(range(len(top20)), list(top20.keys()))
  plt.show()
  </code></pre>
  
  <p>I know, the logic follows a dictionary as an input, but I cannot think of a way to make this work. Please help, and thank you in advance.</p>