10 2019 档案
摘要:深浅拷贝 #_author:Administrator#date:2019/10/31#深浅拷贝#浅拷贝:只copy 第一层#深拷贝:全部克隆#(1)a=[1,'laitongxing',[1,2,3]]print(a)#[1, 'laitongxing', [1, 2, 3]]s=a.copy()
阅读全文
摘要:三级菜单优化 北京上海广州山东>>:北京朝阳昌平海淀>>:昌平沙河天通苑回龙观>>:b朝阳昌平海淀>>:朝阳国贸望京三里屯>>:望京MoMo奔驰360>>
阅读全文
摘要:三级菜单项目 北京上海广州山东>>1北京朝阳昌平海淀>>2昌平沙河天通苑回龙观>>3沙河老男孩阿泰包子>>4bleast level沙河天通苑回龙观>>3q 进程已结束,退出代码0
阅读全文
摘要:对字符串的操作(一些重要的方法) #_author:Star#date:2019/10/27#字符串#1.重复输出字符串print('hello'*2)#hellohello#2.通过索引获取字符串中的字符,这里和列表的切片操作是相同的str='hi_star'print(str[1:])#i_st
阅读全文
摘要:用for循环输出商品名单,其中用了enumerate函数对列表进行格式化输出 please input your salary:11 > ('iphone11', 5800)2 > ('mac book ', 9000)3 > ('coffee ', 38)4 > ('python book', 8
阅读全文
摘要:嵌套列表实现购物车项目 please input your salary:5880购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当
阅读全文
摘要:购物程序 please input your salary:6000购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当前余额为200
阅读全文
摘要:列表中的index,extend,count方法 first_black_index: 3second_black_index: 1second_black_index_in_big_list: 5second_black_value is: black[1, 2, 3, 4, 5, 6]3 ['m
阅读全文
摘要:#_author:Administrator#date:2019/10/24#列表List#增删改查#增 *1 切片a=['xiaowwang','xiaohuang','xiaozhang','xiaodu','aming']print(a[4]) #amingprint(a[1:]) #['xi
阅读全文
摘要:please input your username:aplease input your password:ayour username or password is Errorplease input your username:aplease input your password:ayour
阅读全文
摘要:登录操作(方法二:for与else搭配) please input your username:aaaplease input your password:ayour username or password is Errorplease input your username:aplease in
阅读全文
摘要:登录操作(方法一:设置flag标志位) please input your username:qweplease input your password:222your username or password is Errorplease input your username:starpleas
阅读全文
摘要:Name:Mr.starAge:22Job:Python engenerSalary:12000 info of Mr.star Name:Mr.starAge:22Job:Python engenerSalary:12000you will be retired in 43 years
阅读全文
摘要:print("*" *8)for a in range(1,9): print(a,end="")#1-9的奇数print()for a in range(1,10,2): print(a,end="")#1-100的和print()sum=0for a in range(1,101): sum+=
阅读全文
摘要:while循环'''此类编程题,注意带进去试一试1.九九乘法表row=1while row<=9: col=1 while col<=row: print(col,"*",row,"=",row*col,end=" ") col+=1 print() row+=1 #注意end=" "2.按照用户的
阅读全文