10 2019 档案

摘要:集合及其操作 阅读全文
posted @ 2019-10-31 18:32 Stary_tx 阅读(398) 评论(0) 推荐(0) 编辑
摘要:深浅拷贝 #_author:Administrator#date:2019/10/31#深浅拷贝#浅拷贝:只copy 第一层#深拷贝:全部克隆#(1)a=[1,'laitongxing',[1,2,3]]print(a)#[1, 'laitongxing', [1, 2, 3]]s=a.copy() 阅读全文
posted @ 2019-10-31 17:02 Stary_tx 阅读(171) 评论(0) 推荐(0) 编辑
摘要:eval()方法与str()方法 阅读全文
posted @ 2019-10-31 10:44 Stary_tx 阅读(717) 评论(0) 推荐(0) 编辑
摘要:对文件的修改操作 阅读全文
posted @ 2019-10-31 10:42 Stary_tx 阅读(278) 评论(0) 推荐(0) 编辑
摘要:对文件的操作(2) 阅读全文
posted @ 2019-10-30 22:27 Stary_tx 阅读(142) 评论(0) 推荐(0) 编辑
摘要:在python3中的编码 阅读全文
posted @ 2019-10-29 17:02 Stary_tx 阅读(256) 评论(0) 推荐(0) 编辑
摘要:在python2中的编码 阅读全文
posted @ 2019-10-29 17:01 Stary_tx 阅读(707) 评论(0) 推荐(0) 编辑
摘要:对文件的一些操作2 阅读全文
posted @ 2019-10-29 16:58 Stary_tx 阅读(122) 评论(0) 推荐(0) 编辑
摘要:对文件的操作 阅读全文
posted @ 2019-10-29 16:56 Stary_tx 阅读(251) 评论(0) 推荐(0) 编辑
摘要:三级菜单优化 北京上海广州山东>>:北京朝阳昌平海淀>>:昌平沙河天通苑回龙观>>:b朝阳昌平海淀>>:朝阳国贸望京三里屯>>:望京MoMo奔驰360>> 阅读全文
posted @ 2019-10-28 20:56 Stary_tx 阅读(228) 评论(0) 推荐(0) 编辑
摘要:三级菜单项目 北京上海广州山东>>1北京朝阳昌平海淀>>2昌平沙河天通苑回龙观>>3沙河老男孩阿泰包子>>4bleast level沙河天通苑回龙观>>3q 进程已结束,退出代码0 阅读全文
posted @ 2019-10-28 18:18 Stary_tx 阅读(198) 评论(0) 推荐(0) 编辑
摘要:对字符串的操作(一些重要的方法) #_author:Star#date:2019/10/27#字符串#1.重复输出字符串print('hello'*2)#hellohello#2.通过索引获取字符串中的字符,这里和列表的切片操作是相同的str='hi_star'print(str[1:])#i_st 阅读全文
posted @ 2019-10-27 12:47 Stary_tx 阅读(575) 评论(0) 推荐(0) 编辑
摘要:字典的操作(增删改查) 阅读全文
posted @ 2019-10-26 12:45 Stary_tx 阅读(1632) 评论(0) 推荐(0) 编辑
摘要:用for循环输出商品名单,其中用了enumerate函数对列表进行格式化输出 please input your salary:11 > ('iphone11', 5800)2 > ('mac book ', 9000)3 > ('coffee ', 38)4 > ('python book', 8 阅读全文
posted @ 2019-10-25 19:45 Stary_tx 阅读(179) 评论(0) 推荐(0) 编辑
摘要:嵌套列表实现购物车项目 please input your salary:5880购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当 阅读全文
posted @ 2019-10-25 17:21 Stary_tx 阅读(215) 评论(0) 推荐(0) 编辑
摘要:购物程序 please input your salary:6000购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当前余额为200 阅读全文
posted @ 2019-10-25 10:02 Stary_tx 阅读(213) 评论(0) 推荐(0) 编辑
摘要:列表中的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 阅读全文
posted @ 2019-10-24 18:30 Stary_tx 阅读(353) 评论(0) 推荐(0) 编辑
摘要:#_author:Administrator#date:2019/10/24#列表List#增删改查#增 *1 切片a=['xiaowwang','xiaohuang','xiaozhang','xiaodu','aming']print(a[4]) #amingprint(a[1:]) #['xi 阅读全文
posted @ 2019-10-24 17:41 Stary_tx 阅读(286) 评论(0) 推荐(0) 编辑
摘要:please input your username:aplease input your password:ayour username or password is Errorplease input your username:aplease input your password:ayour 阅读全文
posted @ 2019-10-24 15:37 Stary_tx 阅读(259) 评论(0) 推荐(0) 编辑
摘要:登录操作(方法二:for与else搭配) please input your username:aaaplease input your password:ayour username or password is Errorplease input your username:aplease in 阅读全文
posted @ 2019-10-24 14:56 Stary_tx 阅读(199) 评论(0) 推荐(0) 编辑
摘要:登录操作(方法一:设置flag标志位) please input your username:qweplease input your password:222your username or password is Errorplease input your username:starpleas 阅读全文
posted @ 2019-10-24 14:53 Stary_tx 阅读(940) 评论(0) 推荐(0) 编辑
摘要:Name:Mr.starAge:22Job:Python engenerSalary:12000 info of Mr.star Name:Mr.starAge:22Job:Python engenerSalary:12000you will be retired in 43 years 阅读全文
posted @ 2019-10-24 13:43 Stary_tx 阅读(175) 评论(0) 推荐(0) 编辑
摘要: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+= 阅读全文
posted @ 2019-10-24 12:46 Stary_tx 阅读(222) 评论(0) 推荐(0) 编辑
摘要:while循环'''此类编程题,注意带进去试一试1.九九乘法表row=1while row<=9: col=1 while col<=row: print(col,"*",row,"=",row*col,end=" ") col+=1 print() row+=1 #注意end=" "2.按照用户的 阅读全文
posted @ 2019-10-23 18:19 Stary_tx 阅读(282) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示