【第四章】零基础学Python实战练习(明日科技书本配套)

本章节深入探讨Python序列的应用,通过四个实战练习,包括代码展示和执行结果,帮助初学者掌握序列操作技巧。
摘要由CSDN通过智能技术生成

第四章 序列的应用

实战一

在这里插入图片描述

代码

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<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值