(Here's a sort of hypothetical situation for everybody. I'm more looking for directions rather than straight processes, but if you can provide them, awesome!)
So let's say we have a list of athletes, I'm going to use figure skaters since I'm knee deep in the Winter Olympics right now. (I'm throwing it in a dictionary since that's my first instinct, doesn't have to be this way.)
after_short_program = {
'1': 'Evgeni Plushenko',
'2': 'Evan Lysacek',
'3': 'Daisuke Takahashi',
'4': 'Nobunari Oda',
'5': 'Stephane Lambiel'
}
So after the free skate (which hasn't happened as I ask this), let's say these are the standings.
after_free_skate = {
'1': 'Evan Lysacek',
'2': 'Daisuke Takahashi',
'3': 'Evgeni Plushenko',
'4': 'Stephane Lambiel',
'5': 'Nobunari Oda',
}
So, the questions:
How would one go about comparing the two sets of data? Evan Lysacek moved up one space to win the gold, Daisuke moved up one place to win the silver and Evgeni moved down two spaces to win the bronze. Off the top of my head, if I were to render this information, I'd want to say, "Evan (+1 or moved up one), Evgeni (-2 or moved down two), etc."
Is there a way in Python to extract that sort of data from comparisons?