摘要: 一、字符串查找和替换hello_str="hello word"#判断是否以指定字符串开始print(hello_str.startswith("hello")) True#判断是否以指定字符串结束print(hello_str.endswith("word")) True#查找指定字符串print 阅读全文
posted @ 2018-12-13 22:33 我是一只小小小小鸟~ 阅读(897) 评论(0) 推荐(0) 编辑
摘要: #在python里时间戳可以通过time模块的time()方法获取,如下: import timeprint(time.time())输出结果:1544684606.9632869 #时间戳→指定格式的日期格式: import timest=time.localtime(1544758200)sr= 阅读全文
posted @ 2018-12-13 15:56 我是一只小小小小鸟~ 阅读(305) 评论(0) 推荐(0) 编辑