我有一个2d数组,我想让程序从中搜索.
HabitatGroups = [["amethyst","silver","crystal","copper","red"],#mountain/hill
["black","gold","green"],#swamp/forest
["amethyst","blue","bronze","gold","topaz"],#water adjacent
["blue","brass","copper"],#warm dry
["white","crystal","silver"],#cold
["sapphire","emerald","crystal","amethyst","blue"]]#underground
x=input("Choose a type of dragon")
基本上,我希望程序取x并使用它从x所在的所有列表中随机 Select .假设x为"银色",程序将搜索数组的山地/丘陵和寒冷区域,并随机 Select 不同的选项.我该怎么做呢?