Python guides
Every published Python guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Python guides
Most readLatest Python guides
Page 128 of 179Python's map() Function: Usage and Tradeoffs
Learn how to use Python's built-in map() function to apply a function to iterables, understand lazy evaluation, and decide when map() is a better choice than list comprehensions.
Python enumerate Function: Syntax and Examples
Learn how to use Python's enumerate() to get both index and value in loops, with practical examples and performance notes.
Python divmod Function: Quotient and Remainder Together
Learn how Python's built-in divmod function returns both the quotient and the remainder in one call, with practical examples, edge cases, and performance notes.
Python pow() Function: Syntax, Modulo, and Performance
Learn how Python's pow() function supports exponentiation and modular arithmetic, including its two- and three-argument forms, edge cases, and performance trade-offs.
Python abs Function: Syntax, Behavior, and Alternatives
python abs function: Understand Python's abs() function: syntax, behavior with int, float, complex, custom objects, and when to use alternatives like math.fabs.
Python sum Function: Syntax, Behavior, and Limits
Learn how Python's built-in sum() works: syntax, start parameter, performance behavior, and when to choose alternatives like math.fsum or functools.reduce.
Python min() and max() Functions: Syntax, key, and default
Understand Python's built-in min() and max() functions, including syntax, the key parameter, a default for empty iterables, performance, and edge cases.
How the Python len Function Works
python len function: Understand how Python's len() works internally, which types support it, how to implement __len__ in custom classes, and why it runs in constant time.
Python Built-in Functions: A Practical Guide
Python built-in functions are always available without imports. This guide explains key functions for type conversion, iteration, attribute access, and I/O with practical examples.
Python Lambda with Sorted: Custom Sorting Made Clear
python lambda with sorted: Learn how to use lambda functions with Python's sorted() to sort lists, dictionaries, and objects by custom keys, with practical examples an...