def show(): for x in d.items(): ans = fieldinR1.get() # print(d.get(ans)) fieldout.insert(0,(d.get(ans))) break if ans