← back to unit
Medium
# sorting medium
Alphabetize the Guest List
The royal ball's guest list must be alphabetical before the trumpets sound. 🎺
You get a list of names. Sort them alphabetically with one of YOUR hand-built sorts (word comparisons work with < just like numbers). Print comma-separated.
Example:
Input: names = ["mia", "leo", "ana", "zed"]
Output: ana,leo,mia,zed
Sorting alphabetically compares names with < exactly like numbers.
💡 need a hint?
sort-alphabetize-guests.py🔒 given lines are locked — write your code in between
loading...