Tagged articles
14 articles
Page 1 of 1
MaGe Linux Operations
MaGe Linux Operations
Jul 11, 2024 · Fundamentals

Master Python list.sort vs sorted: Tips, Syntax, and Real-World Examples

This guide explains the differences between Python's list.sort method and the sorted function, covering their syntax, parameters, performance nuances, and practical examples such as ascending/descending order, custom key functions, and creating sorted copies without altering the original list.

Code ExamplesData StructuresPython
0 likes · 7 min read
Master Python list.sort vs sorted: Tips, Syntax, and Real-World Examples
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
Test Development Learning Exchange
Test Development Learning Exchange
Mar 16, 2024 · Fundamentals

Python Built-in Functions and Utilities

This article introduces 10 essential Python built-in functions and utilities including enumerate(), zip(), filter(), map(), sorted(), functools.partial(), itertools.combinations(), lambda, getattr()/setattr(), and reversed(), with practical code examples for each.

LambdaMAPPython
0 likes · 3 min read
Python Built-in Functions and Utilities
Test Development Learning Exchange
Test Development Learning Exchange
Jul 12, 2018 · Fundamentals

Python built‑in functions: sorted, eval, and upper – syntax, parameters, and practical examples

This article explains how to use Python's sorted, eval, and upper built‑in functions, covering their syntax, optional arguments such as key, cmp, and reverse, safety considerations for eval, and concrete code examples that demonstrate sorting lists, converting strings to uppercase, and evaluating literals.

Lambdacoding-tutorialeval
0 likes · 6 min read
Python built‑in functions: sorted, eval, and upper – syntax, parameters, and practical examples