摘要: 综述 python 实现对于字符串的模糊匹配 python 实现对于字符串的模糊匹配 1 # python 实现对于字符串的模糊匹配 2 import difflib 3 4 # 第一个参数:所要进行搜索的关键字;第二个参数:所要进行匹配的目标列表 5 result = difflib.get_cl 阅读全文
posted @ 2022-01-27 17:15 Bro_Li 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 综述 对列表进行排序 对列表进行排序 1 temp = ['1', '3', '4', '5', '2', '6'] 2 temp = [1,5,6,4,8,2,3] 3 print(temp) 4 temp.sort() # 对列表数据进行排序 5 print(temp) 结果如下 1 [1, 5 阅读全文
posted @ 2022-01-27 17:04 Bro_Li 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 综述 输出系统的当前时间 输出系统的当前时间 1 # 输出系统的当前时间 2 from datetime import datetime 3 print('本次运行是几点 : ', datetime.now()) 4 print("hello world") 阅读全文
posted @ 2022-01-27 16:40 Bro_Li 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 使用 zipfile 的方式: import os import zipfile # 解压数据集函数 def unzip_data(src_path, target_path): # 解压原始数据集,将src_path路径下的zip包解压至data/dataset目录下 if(not os.path 阅读全文
posted @ 2022-01-27 11:44 Bro_Li 阅读(280) 评论(0) 推荐(0) 编辑