摘要: #(1)遍历列表 print('列表的遍历:') a=[1,2,3]; for i in a: print(i); #(2)遍历元组 print('元组的遍历:') a=(4,5,6); for i in a: print(i); #(3)遍历集合 print('集合的遍历:') a={7,8,9} for i in a: print(i); #(4)遍历字典 print... 阅读全文
posted @ 2018-10-08 11:12 无名之辈qaq 阅读(150) 评论(0) 推荐(0) 编辑
摘要: y="37232519970909085X" print("省份编码:"+y[0:2]) print("县区编码:"+y[2:4]) print("县区编码:"+y[4:6]) print("出生年月日:"+y[6:10]+"年"+y[10:12]+"月"+y[12:14]+"日") print("户口所在派出所编码:"+y[14:16]) print("性别编码:"+y[16:17]) pri. 阅读全文
posted @ 2018-09-10 10:52 无名之辈qaq 阅读(138) 评论(0) 推荐(0) 编辑
摘要: name1=input('请输入姓名') name2=input('请输入姓名') name3=input('请输入饭店名') print('{}今天心情特别好.\n于是想请{}吃饭.\n他们去了{}'.format(name1,name2,name3)) input('press and key...') #输入摄氏温度 num3=input('请输入摄氏温度:') num4=float... 阅读全文
posted @ 2018-09-03 10:23 无名之辈qaq 阅读(121) 评论(0) 推荐(0) 编辑