abc={'苹果':10} d=input("你想要的水果?") e=input("今日水果价钱是多少?") if d in abc: if int(e)>abc[d]: print("涨价了我们不买了") else: print("买吧") else: abc[d]=int(e)