Tagged articles
5 articles
Page 1 of 1
Code Mala Tang
Code Mala Tang
Apr 27, 2025 · Fundamentals

Master Python’s Stable Sorting: Using sorted() with key and reverse

Python’s sorted() function offers stable sorting, allowing multi‑criteria ordering through successive sorts, while its flexible key parameter lets you customize sorting logic—such as sorting by length then alphabetically—and the reverse flag enables effortless descending order, making complex sorting tasks straightforward.

PythonSortingkey function
0 likes · 4 min read
Master Python’s Stable Sorting: Using sorted() with key and reverse
Test Development Learning Exchange
Test Development Learning Exchange
Jun 20, 2024 · Fundamentals

Master Python’s sorted() Function: 10+ Real-World Examples & Advanced Tips

Explore the versatile sorted() built‑in in Python through over ten practical examples, covering basic list and string sorting, custom key functions, reverse ordering, composite criteria, and real‑world use cases like sorting dictionaries and word‑frequency analysis, empowering you to write cleaner, more efficient code.

Pythondata sortingexamples
0 likes · 6 min read
Master Python’s sorted() Function: 10+ Real-World Examples & Advanced Tips
php Courses
php Courses
Aug 2, 2023 · Backend Development

Understanding and Using PHP's key() Function

This article explains PHP's key() function, its syntax, how it determines the current array pointer's key, the possible return values, and provides multiple code examples demonstrating its behavior with indexed, associative, and empty arrays.

Arraykey functionphp-tutorial
0 likes · 5 min read
Understanding and Using PHP's key() Function
Laravel Tech Community
Laravel Tech Community
Dec 18, 2020 · Backend Development

Using PHP key() to Retrieve Keys from Associative Arrays

This article explains the PHP key() function, its parameters and return values, and demonstrates with a complete example how to iterate over an associative array to output the keys whose values match a specific condition, such as finding all keys for the value "apple".

BackendPHPTutorial
0 likes · 2 min read
Using PHP key() to Retrieve Keys from Associative Arrays