Using histogram to sort list
<p>Given a histogram as a dictionary, what is the most pythonic, "batteries included" way of sorting a list which only has elements from the dictionary, by the frequencies defined in that dictionary?</p>

<p>The keys of the dictionary (and implicitly the values in the list) are strings, and the frequencies are stored as integers.</p>

<p>I am interested only in the python2 solution, but you're welcome to write a python solution as well, so others can benefit from it too (in the future).</p>
