文章插图
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=" ")
文章插图
title = ['车次 ', '出发站-到达站 ', '出发时间 ', '到达时间 ', '历时 ']num = ['T40', 'T298', 'Z158', 'Z62']place = ['长春-北京', '长春-北京', '长春-北京', '长春-北京']start = ['00:12', '00:06', '12:48', '21:57']final = ['12:20', '10:50', '21:06', '06:08']time = ['12:08', '10:44', '08:18', '08:20']print(title[0], ' ', title[1], ' ', title[2], ' ', title[3], ' ', title[4])print(num[0], ' ', place[0], ' ', start[0], ' ', final[0], ' ', time[0])print(num[1], ' ', place[1], ' ', start[1], ' ', final[1], ' ', time[1])print(num[2], ' ', place[2], ' ', start[2], ' ', final[2], ' ', time[2])print(num[3], ' ', place[3], ' ', start[3], ' ', final[3], ' ', time[3])m = dict(zip(num, start))n = dict(zip(num, place))a = input('请输入要购买的车次:')b = input('请输入乘车人(用逗号):')aplace = n[a]astart = m[a]print(f'您已购{a}次列车 {aplace} {astart}开, 请{b}尽快换取纸质车票 。【铁路客服】')
推荐阅读
- 关于第三方物流的参考文献 近3年第三方物流论文参考文献
- 成都出发1 耿达熊猫基地门票价格
- 鲁迅逝世84周年,你有什么想说的?
- 我叫MT第三季第五集中的凤姐是谁?那个BL法师叫三哥的又是谁啊?
- 周大福黑金是足金吗 周大福黑金是黄金吗
- 西周定都在哪里怎么读 西周定都在哪里
- 周大福事件法官是谁
- 我报警抓第三者可以吗?
- 沈阳新生儿黄疸怎么办
- 为什么去周大福k金的不给换 为什么周大福3d硬金不按克卖