def translater(arr):
    ndic = {}
    for i in arr:
        if (ndic.get(i['stock']) is None):
            ndic[i['stock']] = i['amount']
        else:
            ndic[i['stock']] += i['amount']
    print (ndic)

if __name__ == '__main__':
    # arr = [{'stock':'naver', 'amount':400}, {'stock':'daum', 'amount':300}, {'stock':'naver', 'amount': 750}]
	arr = [{'stock': 'naver', 'amount': 400}, {'stock': 'daum', 'amount': 300}, {'stock': 'naver', 'amount': 750}, {'stock': 'netmarble', 'amount': 340}, {'stock': 'daum', 'amount': 500}, {'stock': 'nexon', 'amount': 1000}, {'stock': 'daum', 'amount': 650}]
	translater(arr)
819b9f386b06d9a3861a322f9d35ccff2c98f881
<mask token>

def translater(arr):
    ndic = {}
    for i in arr:
        if ndic.get(i['stock']) is None:
            ndic[i['stock']] = i['amount']
        else:
            ndic[i['stock']] += i['amount']
    print(ndic)


<mask token>

def translater(arr):
    ndic = {}
    for i in arr:
        if ndic.get(i['stock']) is None:
            ndic[i['stock']] = i['amount']
        else:
            ndic[i['stock']] += i['amount']
    print(ndic)


if __name__ == '__main__':
    arr = [{'stock': 'naver', 'amount': 400}, {'stock': 'daum', 'amount': 
        300}, {'stock': 'naver', 'amount': 750}, {'stock': 'netmarble',
        'amount': 340}, {'stock': 'daum', 'amount': 500}, {'stock': 'nexon',
        'amount': 1000}, {'stock': 'daum', 'amount': 650}]
    translater(arr)

def translater(arr):
    ndic = {}
    for i in arr:
        if (ndic.get(i['stock']) is None):
            ndic[i['stock']] = i['amount']
        else:
            ndic[i['stock']] += i['amount']
    print (ndic)

if __name__ == '__main__':
    # arr = [{'stock':'naver', 'amount':400}, {'stock':'daum', 'amount':300}, {'stock':'naver', 'amount': 750}]
	arr = [{'stock': 'naver', 'amount': 400}, {'stock': 'daum', 'amount': 300}, {'stock': 'naver', 'amount': 750}, {'stock': 'netmarble', 'amount': 340}, {'stock': 'daum', 'amount': 500}, {'stock': 'nexon', 'amount': 1000}, {'stock': 'daum', 'amount': 650}]
	translater(arr)