# -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 14:54:28 2017

@author: Administrator
"""

from collections import defaultdict

d =defaultdict(list)
data1 = [
        ('aa',1),
        ('bbb',111),
        ('ccc',11),
        ]

for key,value in data1:
    d[key].append(value)
    
prices = {
        'aaa':100,
        'bb':60,
        'cc':90,
        'dd':60
        }

min_price = min(zip(prices.values(),prices.keys()))
print(min_price)
    
8b94efb6c31e22aee5514cd11c22357586eaad02
<mask token>

<mask token>
for key, value in data1:
    d[key].append(value)
<mask token>
print(min_price)

<mask token>
d = defaultdict(list)
data1 = [('aa', 1), ('bbb', 111), ('ccc', 11)]
for key, value in data1:
    d[key].append(value)
prices = {'aaa': 100, 'bb': 60, 'cc': 90, 'dd': 60}
min_price = min(zip(prices.values(), prices.keys()))
print(min_price)

<mask token>
from collections import defaultdict
d = defaultdict(list)
data1 = [('aa', 1), ('bbb', 111), ('ccc', 11)]
for key, value in data1:
    d[key].append(value)
prices = {'aaa': 100, 'bb': 60, 'cc': 90, 'dd': 60}
min_price = min(zip(prices.values(), prices.keys()))
print(min_price)

# -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 14:54:28 2017

@author: Administrator
"""

from collections import defaultdict

d =defaultdict(list)
data1 = [
        ('aa',1),
        ('bbb',111),
        ('ccc',11),
        ]

for key,value in data1:
    d[key].append(value)
    
prices = {
        'aaa':100,
        'bb':60,
        'cc':90,
        'dd':60
        }

min_price = min(zip(prices.values(),prices.keys()))
print(min_price)
    