Groupon interview question

Python sorting and dictionary creation.