Modify value in dictionary | Python : Im learning python. trying to make my first software.
If someone can help me :

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 : 13,000 : 2

so dict will inclued : 13000:4 , 12000:2

# adding the length + amount to the dict.
    dict[length] = amount

   Sorry if i wasnt so clear. hope you help.
Thank you 

