面向对象很优雅! from re import M import sys commands = input().split(';')[:-1] class VendeMachine(): def __init__(self, r): r = r.split(' ') GoodsSelves = r[1].split('-') self.Goods = [f'A{i+1}' for i in range(6)] self.GoodsSelves = {f'A{i+1}':int(GoodsSelves[i]) for i...