from collections import Counter c = Counter(input()) l=sorted(c.items(), key=lambda s:(-s[], s[])) ]: print(' '.join(map(str, list(i))))
2022-10-25技术教程下载本文两个,升序,字段,排序,降序
from collections import Counter c = Counter(input()) l=sorted(c.items(), key=lambda s:(-s[], s[])) ]: print(' '.join(map(str, list(i))))
《python 根据两个字段排序, 一个升序, 一个降序.doc》
下载本文的Word格式文档,以方便收藏与打印。