[Solved] add keys and values from input method [closed]


you can do:

count=2
x= {}
while count:
    name=input('name:')
    value=int(input('value:'))
    x[name]=value
    count-=1

maxKey= max(x, key=x.get)
maxValue=max(x.values())
print maxKey,maxValue

which will result in:

enter image description here

solved add keys and values from input method [closed]