第四章 序列的应用
实战一
代码
tank = ["苏烈","刘邦","钟馗","张飞","牛魔","程咬金","白起","刘婵","庄周","项羽","廉颇","巨灵神","安禄山","猪八戒",]
zhanshi = ["狂铁","裴庆虎","凯","孙悟空","哪吒","杨戬","橘右京","亚瑟","雅典娜","夏侯惇","关羽","吕布","韩信","老夫子","达摩","典韦","曹操","钟无艳","墨子","赵云","刑天","龙且",]
cike = ["百里玄策","庞统","花木兰","荆轲","不知火舞","李白","娜可露露","兰陵王","露娜","韩信","宫本无","盖聂","红拂女"]
fashi = ["杨玉环","奕星","女娲","周瑜","鬼谷子","芈月","干将莫邪","东皇太一","大乔","诸葛亮","貂蝉","张良","安其拉"]
sheshou = ["公孙离","百里守约","后羿","刘备","黄忠","马可波罗","成吉思汗","虞姬","李元芳","艾琳","狄仁杰","鲁班七号","孙尚香"]
fuzhu = ["明世隐","梦奇","孙膑","太乙真人","蔡文姬"]
print('"王者荣耀"游戏角色:')
print("====坦克:====")
for index,i in enumerate(tank):
if index+1 == len(tank):
print(i)
else:
print(i, " ", end="")
print("====战士:====")
for index,i in enumerate(zhanshi):
if index+1 == len(zhanshi):
print(i)
else<