我的游戏中的随机物品掉落系统有问题。这是我的代码:import random#Potato heals +5potato = "Potato"apple = 1apple_name = "apple"#is_damage_2rusted_sword = "Rusted shortsword"#Worth $80 - 10 can make Goldbladegold_ingot = "Gold ingot"#Worth $120sapphire = "Sapphire"random_drop = [sapphire,potato,gold_ingot,rusted_sword]inventory = [apple_name, apple,]rand_item = random.choice(random_drop)inventory += rand_itemprint(inventory)当它打印库存时...随机项目被添加,但它是这样拼写一个字母的:P,o,t,a,t,o。我希望它拼写为:“土豆”我只学了几周 Python,很困惑。任何帮助将不胜感激!贾斯汀
添加回答
举报
0/150
提交
取消