Code
dict = {}
flag = True
while True:
length = raw_input('enter length')
amount = raw_input('enter amount')
if (length == 'quit') or (amount == 'quit'):
flag = False
continue
I want to add code so
if key in dict:
# previous value + amount
# insert the new value to the key
else:
dict[length] = amount
for example:
my inputs are: 13000,2
than: 12000: 2
and again: 13000: 2
so dict will include 13000: 4
and 12000: 2
if length in dict
?