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

str.title

Capitalizes word starts and lowercases the remaining cased characters.

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

str.upper

Returns the Unicode uppercase mapping of the text.

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

str.zfill

Pads a string with ASCII zeroes on the left to reach the requested width.

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

sys.stdout — the standard output stream

sys.stdout is Python's text stream for standard output, used by print() by default. It supports direct text writes and buffer flushing; it does not necessarily point to a terminal.

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

timeit.repeat

Collects separate elapsed durations from repeated timing experiments.

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

timeit.timeit

Measures the elapsed time for a specified number of repetitions.

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

timeit.Timer

Stores a timing statement and setup operation for repeated measurements with the same configuration.

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

type.__name__

This class attribute gives the simple type name without its module or enclosing classes.

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

typing.Annotated

Associate ordered metadata with a base type for tools that recognize it.

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

typing.Any

Use Any where a value has a dynamically checked type.

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

typing.Callable

Describe a callable by its parameter types and return type.

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

typing.cast

Tell the type checker to treat an expression as the target type.

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

typing.ClassVar

Mark an attribute as belonging to the class for static analysis.

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

typing.Dict — legacy dictionary annotation

typing.Dict describes dictionary key and value types. Since Python 3.9 it is a deprecated alias of dict; use dict[K, V] in new code. The annotation does not validate data at runtime.

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

typing.Final

Declare a name that a type checker should reject rebinding or overriding in a subclass.

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

typing.Generic

Declare a generic class using Generic[T] as its base and a previously declared type variable T as the argument.

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

typing.List — legacy list type annotation

typing.List[T] describes a list of elements of type T. It remains available in Python 3.14, but new code should prefer list[T].

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

typing.Literal

Restrict a static type to particular literal values.

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

typing.NamedTuple

Define an immutable tuple subclass with named, annotated fields.

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

typing.Never

Describe the bottom type, which has no possible values.

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

typing.NewType

Create a distinct static subtype of an existing type, useful for separating identifiers with the same representation.

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

typing.NotRequired

Mark an individual TypedDict key as omissible, even when the other keys are required by default.

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

typing.Optional

Optional[T] allows either T or None and is equivalent to a union with None.

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

typing.overload

Declare alternative argument and result relationships for a static type checker.

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