Mastering Python's Sorted() Function for Efficient Data Sorting
In Python programming, the sorted() function is a built-in utility that allows you to sort various iterable objects. This function can be applied to lists, tuples, strings, and other iterable types, returning a new sorted list. The sorted() function provides several parameters that enable different sorting approaches, including custom sorting f ...
Posted on Tue, 30 Jun 2026 17:39:10 +0000 by Toy
Demystifying the Array.prototype.sort Comparator
While patching a legacy Beego dashboard I stumbled on a tiny sorting requirement that refused to cooeprate. The goal sounded trivial: given an array that mixes one-, two- and three-digit integers, keep the global ascending order but push every two-digit value to the tail.
const sample = [1, 8, 3, 11, 100, 15, 201];
// expected: [1, 3, 8, 100, 2 ...
Posted on Sun, 17 May 2026 08:30:11 +0000 by dolphinsnot