# Dict Update 테스트 ( min값 유지 )
testlist ={}
for a in range(0,20000):
    key = 'itujooijoefwfewewfweggew'+'wefwefdwedewewf'+'fewwef'+'efwef'+str(a)
    for b in range(0,10):
        currentValue = 10 - b
        myValue = {'test2':1,'test':1,'minvalue':currentValue}       
        if key not in testlist:
            testlist[key] = myValue
        else:
            if testlist[key]['minvalue']  > currentValue:
                testlist[key] = myValue

for key in testlist:
    print(testlist[key])


  • No labels