回覆列表
  • 1 # 兔兔我經歷了啦啦啦

    products 是個列表, 列表中的內容是元組.是比較基本的python序列操作 : products= [{ "ID": "001", "Name": "basketball74-604Y", "Price": "176RMB", "Producer": "spalding", "Number": 1 }, { "ID": "002", "Name": "Runningshoes", "Price": "350RMB", "Producer": "new balance", "Number": 1 }, { "ID": "003", "Name": "iPhone6", "Price": "5288RMB", "Producer": "apple", "Number": 1} ]for i in products: if i["ID"] == "001": products.remove(i)print(products)

  • 中秋節和大豐收的關聯?
  • 石榴裡富含那些營養?