Sorting isn't just ascending or descending—sorted can use custom keys to unlock advanced functionality! #PythonTricks #pythonprogramming ---- # Sort by string length names = ["Alice", "Bob", "Christina", "Daniel"] sorted_names = sorted(names, key=len) print(sorted_names) ----
0
3
4
22
0
Download Image