di = {1: '石头', 2: '剪刀', 3: '布'} def win(x, y): if len({x[0], y[0]}) == 1: print('平局.') else: if {x[0], y[0]} == {1,3}: w = sorted([x, y])[1] l = sorted([x, y])[0] else: w = sorted([x, y])[0] l = sorted([x, y])[1] print('%s 的 %s 赢了 %s 的 %s!' % (w[1],…