Task: Sort List by Length and Alphabetical Order
Task: Sort List by Length and Alphabetical Order: a task in Terminal-Lego-15k (Harbor dataset). Create a Python script that sorts a list of words based on two criteria: 1. Primary sort : By length of the string (longest to shortest) 2. Secondary sort : Alphabetically in reverse order (Z to A) for…
The task
Create a Python script that sorts a list of words based on two criteria: 1. **Primary sort**: By length of the string (longest to shortest) 2. **Secondary sort**: Alphabetically in reverse order (Z to A) for words of the same length
Part of PrimeIntellect/Terminal-Lego-15k.