list(word_freq.items())
create list with dict.items()
list(word_freq.items())
create list with dict.items()
{k: v for k, v in sorted(x.items(), key=lambda item: item[1])}
the best way to sort dict in python
wik2dict is a tool written in Python that converts MediaWiki SQL dumps into the DICT format. The script is available under the GNU General Public License. It is also capable of downloading Wikipedia, Wiktionary, Wikiquote, Wikinews and Wikibooks SQL dumps.