📜  python制作播放器设备 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:57.752000             🧑  作者: Mango

代码示例1
#  declare equipment as a dictionary
player_equip_dict = {
    "Helmet": "",
    "Right Hand": "",
    "Left Hand": "",
    "Chest": "",
    "Back": "",
    "Legs": "",
    "Feet": "",
}

#  assign an item to equipment
player_equip_dict.update({"Right Hand": "sword"})

#  remove an item from equipment
player_equip_dict.update({"Right Hand": ""})