[Solved] add keys and values from input method [closed] December 13, 2022 by Kirat 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: solved add keys and values from input method [closed]