Lambda
A lambda creates a small anonymous one-expression function.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 2917–2928 of 3610 questions
A lambda creates a small anonymous one-expression function.
Annotations document expected types and support static analysis, but Python does not enforce them automatically at runti…
A recursive function calls itself and needs a base case.
Lists are ordered mutable sequences and allow duplicates.
Slicing uses start, stop-exclusive, and step indices.
Comprehensions create lists using an expression, loop, and optional filter.
Tuples are ordered immutable sequences, useful for fixed records and unpacking.
Dictionaries map hashable keys to values with average-case fast lookup.
Sets hold unique hashable values and support union, intersection, and difference.
Lists are mutable sequences, tuples immutable sequences, sets unique collections, and dicts key-value maps.
enumerate yields index-value pairs while iterating.
zip combines iterables element-wise and stops at the shortest input by default.