Tag

key function

0 views collected around this technical thread.

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
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.

PHParraybackend
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".

PHPTutorialassociative array
0 likes · 2 min read
Using PHP key() to Retrieve Keys from Associative Arrays
Test Development Learning Exchange
Test Development Learning Exchange
Aug 1, 2018 · Fundamentals

Understanding Python's sorted() Function and Its Differences from list.sort()

This article explains how Python's built‑in sorted() function sorts any iterable and returns a new list, contrasts it with the in‑place list.sort() method, and demonstrates usage of key functions, reverse ordering, and multi‑dimensional sorting with code examples.

IterableSortingkey function
0 likes · 5 min read
Understanding Python's sorted() Function and Its Differences from list.sort()