Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Python

Knowledge base — Python

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 583

Python

dict.popitem

Removes and returns the most recently inserted remaining key and value.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.setdefault

Looks up a key and inserts the given default only when the key is missing.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.update

Copies key and value bindings into the current dictionary.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.values

Exposes a live view of dictionary values in key insertion order.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

function.__doc__

A function stores its documentation string in this attribute, or None if it has no docstring.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

function.__name__

This attribute holds a function's simple name, initially supplied by its definition.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.cache

Memoizes function results in an unbounded cache keyed by call arguments.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.cached_property

Computes an attribute on first access and stores the result in the instance dictionary.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.cmp_to_key

Adapts a two-argument comparison function for a sorting interface that expects single-argument keys.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.lru_cache

Caches recent call results while evicting the least recently used key when the size limit is reached.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.partial

Builds a callable with some arguments supplied in advance.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.partialmethod

Defines a method variant that pre-binds selected arguments while preserving normal instance binding.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.reduce

Combines each item with a running accumulator from left to right.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.singledispatch

Dispatches a generic function according to the runtime type of its first argument.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.singledispatchmethod

Dispatches a method using its first argument after the instance or class.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.total_ordering

Synthesizes missing ordering methods from equality and one supplied ordering comparison.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.update_wrapper

Copies selected metadata from the wrapped callable and exposes it through the wrapper’s original-function attribute.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

functools.wraps

Decorates a wrapper so that common metadata identifies the wrapped callable.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

generator.send

send supplies the result of a suspended yield expression and returns the next yielded value.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

heapq.heapify

Transforms a list in place into a minimum heap in linear time.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

heapq.heappop

Removes and returns the smallest item from a min-heap while repairing the heap.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

heapq.heappush

Inserts an item into a minimum heap while preserving its ordering invariant.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

heapq.heappushpop

Combines insertion and removal, returning the smallest of the incoming item and the heap.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

heapq.heapreplace

Removes the existing minimum from a nonempty heap and replaces it with the new item.

Intermediate · Python 3.14; repository image, production runtime not attested