result_dict={'Allen':['red', 'blue', 'yellow'],'Tom': ['green', 'white', 'blue'],'Andy': ['black', 'pink']} for key in sorted(result_dict.keys()): print("%s's favorite colors are:"%key) for value in result_dict[key]: print(value)