1. 对字典按value排序
sorted(d.items(),key = lambda x:x[1],reverse = True)
2. 模糊搜索路径
from glob import glob lists = glob(r‘./*.txt‘) #return all txt file
标签:记录 python技巧 div style reverse nbsp from 字典 list
1. 对字典按value排序
sorted(d.items(),key = lambda x:x[1],reverse = True)
2. 模糊搜索路径
from glob import glob lists = glob(r‘./*.txt‘) #return all txt file
标签:记录 python技巧 div style reverse nbsp from 字典 list
原文地址:https://www.cnblogs.com/dxs959229640/p/8618775.html