I'm writing a tool to plot wich word was how many times used in a large number of rap genius lyrics.
I already extracted to two lists: one for the name of the word. the other one for the amount the word was used.
list_name=["I","you","the"]
list_count=[23,42,12]
the values at the same index are the pairs. I'm not sure if this is the most useful way but that's how I can do a bar chart representing every word and the count of it. Now I want to sort it by the highest count number. If I sort list_count I can't really transfer this to make the list_name in the same order as the list_count.
Any suggestions? I tried dictionarys but I couldn't find a way how they were useful.