Python的list既可以作为stack,也可以作为queue # Total number of operations n = int(input()) # List can be used as a stack stack = [] while n: # [operation [number]] field = input().split() # push == append if field[0] == 'push': stack.append(field[1]) # peek == last item e...