会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
archerzon
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
下一页
2018年8月22日
C++ Primer-hello world
摘要: #include <stdio.h>:定义输入/输出函数 #include <stdlib.h>:定义杂项函数及内存分配函数 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 printf("hello world!\n\
阅读全文
posted @ 2018-08-22 11:48 archerzon
阅读(106)
评论(0)
推荐(0)
2018年8月20日
python-集合
摘要: 集合: 1 list_1 = [1,2,3,3] 2 list_1 = set(list_1)#集合的用法 3 print(list_1,type(list_1)) 4 5 6 list_2 = set([3,4,5]) 7 print(list_1,list_2) 交集和交集运算符: 1 list
阅读全文
posted @ 2018-08-20 14:08 archerzon
阅读(142)
评论(0)
推荐(0)
python-购物车优化二
摘要: 在退出系统,打印购物清单后,wait 2s再退出 1 #Author:Archer Zon 2 import time 3 product_list = [ 4 ('iPhone X', 5800), 5 ('Mac Pro', 10800), 6 ('Bike', 800), 7 ('Coffe'
阅读全文
posted @ 2018-08-20 13:24 archerzon
阅读(126)
评论(0)
推荐(0)
2018年8月18日
python-购物车小优化
摘要: 加入time模块,在退出系统前等待2s 1 import time 2 product_list = [ 3 ('iphone',5800), 4 ('Mac Pro', 10800), 5 ('Bike', 800), 6 ('Coffee', 31), 7 ('iWatch', 6800), 8
阅读全文
posted @ 2018-08-18 15:46 archerzon
阅读(142)
评论(0)
推荐(0)
2018年8月17日
python-字符串,列表,元组,字典,集合小结
摘要: 字符串不能修改,对字符串进行大小写其实质是将原来的字符串覆盖 列表可以增删改查,通过下标来查找 元组是只读列表 字典是无序的,通过key来查找,不通过下标 集合是无序的
阅读全文
posted @ 2018-08-17 17:11 archerzon
阅读(169)
评论(0)
推荐(0)
2018年8月16日
python-三级菜单小程序
摘要: 原理:字典,字典里嵌套字典,while循环嵌套的重复使用,标志位exit_flag的使用,pass的使用(什么都不做,使系统不报错) 1 #Author:Archer Zon 2 data = { 3 '北京':{ 4 "昌平":{ 5 "天河":{1111,"2323fdf"} 6 }, 7 "朝
阅读全文
posted @ 2018-08-16 20:26 archerzon
阅读(136)
评论(0)
推荐(0)
python-字典
摘要: 字典的格式: 1 info = { 2 'stu001' : "Archer", 3 'stu002' : "Berserker", 4 'stu003' : "Caster", 5 } 6 print(info) 查: 1 info ={ 2 'stu001' : "Archer", 3 'stu
阅读全文
posted @ 2018-08-16 16:39 archerzon
阅读(105)
评论(0)
推荐(0)
python-购物车小程序
摘要: 原理:列表,元组,while循环,isdigit,for循环,enumerate用法,if语句的套用, 1 #Author:Archer Zon 2 product_list = [ 3 ('iphone', 5800), 4 ('Mac Pro', 10800), 5 ('Bike', 800),
阅读全文
posted @ 2018-08-16 12:31 archerzon
阅读(149)
评论(0)
推荐(0)
2018年8月15日
python-tuple-元组
摘要: 元组只能count和index,元组的结构为小括号(),且元组的值不能修改,也叫只读列表。元组可以提醒别人这个值不能修改。 names = ('alex','jack')
阅读全文
posted @ 2018-08-15 17:09 archerzon
阅读(137)
评论(0)
推荐(0)
python-列表切片的for循环
摘要: 1 name = ["a","b",["alex","blue"],"c","d"] 2 print(name[0:-1:2]) 3 print(name[::2])#0和-1可以省略 4 print(name[:])#全部打印
阅读全文
posted @ 2018-08-15 16:11 archerzon
阅读(581)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告