会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
乘风破浪会有时,直挂云帆济沧海
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
8
9
10
11
12
2020年8月11日
装饰器
摘要: #Author:Kevin_hou import time def timer(func): #timer(test1) func= test1 def deco(*args, **kwargs): start_time= time.time() func(*args, **kwargs) stop
阅读全文
posted @ 2020-08-11 18:50 JRS077
阅读(63)
评论(0)
推荐(0)
2020年7月26日
文件操作
摘要: 首先新建一个文件 文件操作步骤 打开 操作 关闭 文件读操作 读的同时不可写 #Author:Kevin_hou f = open('机器铃 砍菜刀','r',encoding='utf-8') data = f.read() print(data) f.close() 输出: 只能读1次,不可多次
阅读全文
posted @ 2020-07-26 21:03 JRS077
阅读(87)
评论(0)
推荐(0)
集合
摘要: #Author:Kevin_hou list_1 = [1,2,3,4,5,6,7,8,8] #集合也是无序的 list_1 = set(list_1) list_2 = set([2,4,6,8,10,12]) print(list_1,type(list_1)) print(list_1,lis
阅读全文
posted @ 2020-07-26 15:52 JRS077
阅读(163)
评论(0)
推荐(0)
2020年7月25日
字典操作
摘要: #Author:Kevin_hou data ={ "中国":{ "上海": { "浦东": { "曹路":{}, "川沙":{}, "唐镇":{}, "张江":{}, "金桥":{}, "北蔡":{} }, "黄埔":{}, "徐汇":{}, "静安":{} }, "苏州":{ "吴江":{ "松
阅读全文
posted @ 2020-07-25 19:10 JRS077
阅读(79)
评论(0)
推荐(0)
2020年7月24日
字符串操作
摘要: #Author:Kevin_hou #字符串操作 name =" My name is kevin.hou and I am 30 years old" name1="123456" print(name.__add__(' !!!'))#在字符串后面添加值 print(name.count('a'
阅读全文
posted @ 2020-07-24 23:00 JRS077
阅读(71)
评论(0)
推荐(0)
2020年7月23日
shopping cart
摘要: #Author:Kevin_hou #定义产品列表 product_list =[ ('HUAWEI',5999), ('Watch',500), ('Nike',800), ('Toyota',200000), ('basketball',500), ('bike',1000), ] shoppi
阅读全文
posted @ 2020-07-23 22:46 JRS077
阅读(144)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
公告