Sort and Rank Demographic Groups with sorted() and key= — Python For Students | zuzu.codes