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 145 of 179Python Tuple Repetition with the * Operator
Learn how Python tuple repetition works with the * operator, including syntax, mutable element pitfalls, performance tradeoffs, and alternatives.
Python Tuple Concatenation: Combining Tuples with + and *
Learn how to concatenate tuples in Python using + and *, understand immutability, and avoid common performance pitfalls.
Python Tuple vs List: Key Differences
python tuple vs list: Understand the practical differences between Python tuples and lists, including mutability, memory usage, and when each is the right choice.
Python Tuple Immutability: What It Means in Practice
Understand Python tuple immutability in practice: what operations fail, why immutability is shallow, how hashability works, memory tradeoffs, and when tuples are the better choice.
Python Tuple Index: Access Elements by Position
Learn how to access tuple elements by position, use the index() method, slice tuples, and avoid common indexing errors in Python.
Python Tuple Count: Using count() and len()
Learn how to count elements in Python tuples: use count() for occurrences of a value and len() for total items, with examples and edge cases.
Python Tuple Slicing: Syntax, Steps, and Pitfalls
Learn how to slice tuples in Python, including start, stop, and step behavior, negative indexes, and common edge cases.
Python Tuple Indexing: Syntax, Errors, and Practical Use
python tuple indexing: Understand how Python tuple indexing works: positive and negative indices, slicing, nested tuples, common errors, and when tuples outperform lists.
Python Starred Tuple Unpacking: Syntax and Use Cases
Learn how Python's starred tuple unpacking uses the * operator to assign values, handle variable-length sequences, and avoid common errors.
Python Extended Iterable Unpacking in Practice
python extended iterable unpacking: Learn how Python's extended iterable unpacking works, including star expressions, nested unpacking, and common pitfalls.