selfteaching / selfteaching/selfteaching-python-camp
Day05 sort排序
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
在Day5排序问题中,对于字典,我使用了:
dic2=sorted(dic.items(),key=lambda x:(x[1],x[0]),reverse=True)
实现了先按数字排序,数字相同的情况下,按照字母排序。
但是我的目标是:先按数字排从大到小,在一样数字的情况下,再按字母的从小到大排序。求助该如何处理?
感谢帮助!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Day05 sorting exercise and reproduce the reported dictionary-ordering example. Review the exercise context and determine how the requested ordering should be explained; done means the guidance clearly addresses descending numeric order and ascending alphabetical tie-breaking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- content, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100