文章插图
name = ['绮梦','冷伊一','香凝','黛兰']sign = ['水瓶座','射手座','双鱼座','双子座']dictionary = dict(zip(name,sign))print(dictionary)
文章插图
python = {'绮梦','冷伊一','香凝','黛兰'}C = {'冷伊一','零语','梓轩','圣博'}print( '选择Python语言的学生有: ',python, '\n')print( '选择C语言的学生有: ',C)
文章插图
python = set(['绮梦','冷伊一','香凝','梓轩'])C = set(['冷伊一','零语','梓轩','圣博'])print( '选择Python语言的学生有: ',python, )print( '选择C语言的学生有: ',C)print('交集运算:',python & C)print('并集运算:',python | C)print('差集运算:',python - C)
文章插图
python = set(['绮梦','冷伊一','香凝','梓轩'])python.add('零语')C = set(['冷伊一','零语','梓轩','圣博'])C.remove('零语')print( '选择Python语言的学生有: ',python, '\n')print( '选择C语言的学生有: ',C)
文章插图
print("“王者荣耀“游戏角色:")print("====坦克:====")tank = ["苏烈", "刘邦", "钟馗", "张飞", "牛魔", "程咬金", "白起", "刘禅", "庄周", "项羽", "廉颇", "巨灵神", "安禄山", "猪八戒"]for i in tank: print(i, end=" ")print("\n"+"====战士:====")zhanshi = ["狂铁", "裴擒虎", "铠", "孙悟空", "哪吒", "杨戬", "橘右京", "亚瑟", "雅典娜", "夏侯惇", "关羽", "吕布", "韩信", "老夫子", "达摩", "典韦", "曹操", "钟无艳", "墨子", "赵云", "刑天", "龙且"]for i in zhanshi: print(i, end=" ")print("\n"+"====刺客:====")cike = ["百里玄策", "庞统", "花木兰", "靳柯", "不知火舞", "李白", "娜可露露", "兰陵王", "韩信", "宫本武藏", "盖聂", "红拂"]for i in cike: print(i, end=" ")print("\n"+"====法师:====")fashi = ["杨玉环", "奕星", "女娲", "周瑜", "鬼谷子", "芈月", "东皇太一", "大乔", "诸葛亮", "貂蝉", "张良", "安琪拉"]for i in fashi: print(i, end=" ")print("\n"+"====射手:====")sheshou = ["公孙离", "百里守约", "后羿", "刘备", "黄忠", "马可波罗", "成吉思汗", "虞姬", "李元芳", "艾琳", "狄仁杰", "鲁班七号", "孙尚香"]for i in sheshou: print(i, end=" ")print("\n"+"====辅助:====")fuzhu = ["明世隐", "梦奇", "孙膑", "太乙真人", "蔡文姬"]for i in fuzhu: print(i, end=" ")
经验总结扩展阅读
- 致命女人每周更新时间是什么时候?
- 电视剧致命女人周几更?
- 蒙面唱将周传雄是哪一期?
- 晓松说周杰伦是那一期?
- 袁泉和周润发演的电影是哪部?
- 文豪野犬第三季的内容是什么?
- 周仰杰的鞋子什么档次的?
- 周金生是个什么牌子的珠宝?
- 开讲啦周杰伦是哪一期?
- 那年花开月正圆杜明礼知道周莹身世第几集?