会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一只竹子
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2019年12月6日
常用时间处理方法
摘要: 今天 today = datetime.date.today() 昨天 yesterday = today - datetime.timedelta(days=1) 上个月 last_month = today.month - 1 if today.month - 1 else 12 当前时间戳 t
阅读全文
posted @ 2019-12-06 15:56 一只竹子
阅读(218)
评论(0)
推荐(0)
2019年11月22日
遍历技巧
摘要: 遍历技巧 在字典中遍历时,关键字和对应的值可以使用 items() 方法同时解读出来: >>> knights = {'gallahad': 'the pure', 'robin': 'the brave'}>>> for k, v in knights.items():... print(k, v
阅读全文
posted @ 2019-11-22 15:34 一只竹子
阅读(179)
评论(0)
推荐(0)
列表中的方法
摘要: 列表 Python中列表是可变的,这是它区别于字符串和元组的最重要的特点,一句话概括即:列表可以修改,而字符串和元组不能。 以下是 Python 中列表的方法: 方法描述 list.append(x) 把一个元素添加到列表的结尾,相当于 a[len(a):] = [x]。 list.extend(L
阅读全文
posted @ 2019-11-22 14:53 一只竹子
阅读(234)
评论(0)
推荐(0)
2019年11月20日
集合内置方法
摘要: 集合内置方法完整列表 方法描述 add() 为集合添加元素 clear() 移除集合中的所有元素 copy() 拷贝一个集合 difference() 返回多个集合的差集 difference_update() 移除集合中的元素,该元素在指定的集合也存在。 discard() 删除集合中指定的元素
阅读全文
posted @ 2019-11-20 16:28 一只竹子
阅读(150)
评论(0)
推荐(0)
字典内置函数和方法
摘要: 字典内置函数&方法 Python字典包含了以下内置函数: 序号函数及描述实例 1 len(dict)计算字典元素个数,即键的总数。 >>> dict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First'} >>> len(dict) 3 2 str(dict
阅读全文
posted @ 2019-11-20 14:50 一只竹子
阅读(414)
评论(0)
推荐(0)
元组内置函数
摘要: 元组内置函数 Python元组包含了以下内置函数 序号方法及描述实例 1 len(tuple)计算元组元素个数。 >>> tuple1 = ('Google', 'Runoob', 'Taobao') >>> len(tuple1) 3 >>> 2 max(tuple)返回元组中元素最大值。 >>>
阅读全文
posted @ 2019-11-20 14:42 一只竹子
阅读(219)
评论(0)
推荐(0)
Python列表函数&方法
摘要: Python列表函数&方法 Python包含以下函数: 序号函数 1 len(list)列表元素个数 2 max(list)返回列表元素最大值 3 min(list)返回列表元素最小值 4 list(seq)将元组转换为列表 Python包含以下方法: 序号方法 1 list.append(obj)
阅读全文
posted @ 2019-11-20 14:36 一只竹子
阅读(434)
评论(0)
推荐(0)
2019年11月19日
参数化
摘要: import parameterizedimport unittestimport parameterizedimport unittest,BeautifulReport#数据驱动#代码驱动#关键字驱动data = [ ['admin','123456',True], ['admin','1122
阅读全文
posted @ 2019-11-19 23:25 一只竹子
阅读(277)
评论(0)
推荐(0)
搭建测试环境过程
摘要: 1、搭建测试环境 1、申请服务器 2、安装依赖的软件 jdk1.8、mysql、redis、tomcat等等 3、获取代码,修改配置文件,(编译、打包) 4、导入基础数据(建表、导入数据) 5、代码放到服务器上,启动 2、日常部署 1、拉取最新代码,修改配置文件,(编译、打包) 2、如果有变动的sq
阅读全文
posted @ 2019-11-19 23:16 一只竹子
阅读(363)
评论(0)
推荐(0)
虚拟环境
摘要: 虚拟环境: pip install virtualenv e://virtual_envs #建个文件夹专门放虚拟环境的 cd e://virtual_envs virtualenv py3 #干净的环境,没有第三方模块,只有pip cd /User/virtual_envs/py3/bin #进入
阅读全文
posted @ 2019-11-19 23:13 一只竹子
阅读(112)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告