I have one list of dicts that has a bunch of songs in order of top played. Then I have another list of dicts of local songs. I want to sort the local songs according to the top played songs, but only if there's a local song that matches the song at a given index in the top played list. Turning the local songs into a dictionary so I could just do a hash lookup seemed a lot faster than iterating over every local song for every song in the top played list. And since I have to compare based on two values that should match between the lists, I used a tuple as the key.
If there's a faster way I'd be down to implement it since, yeah, this is a little slow since it's a fairly large data set.