补全下列代码 products = [ {"id": 1, "name": "华为Mate50 pro", "price": 6399, "quantity": 100}, {"id": 2, "na...

print("----------------- 产品信息 -----------------") print("编号 | 名称 | 价格 | 数量")

for product in products: id = product["id"] name = product["name"] price = product["price"] quantity = product["quantity"] print("{} | {} | {} | {}".format(id, name, price, quantity))

print("----------

你可能感兴趣的:(python,开发语言)