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

math.pi

Supplies the floating-point constant used for half a turn in radians.

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

math.prod

Multiplies the members of an iterable beginning with an optional initial factor.

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

math.sin

Computes the sine of an angle measured in radians.

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

math.sqrt

Returns the nonnegative real square root of its argument.

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

math.tan

Computes the tangent of a radian angle.

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

math.trunc

Discards the fractional part of a real number and returns its integral part.

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

object.__class__

On an ordinary instance the attribute references its class object.

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

object.__enter__

The entry method runs before the with body and its result binds to the as target.

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

object.__eq__

An equality method can compare its own data or return NotImplemented for an unsupported type.

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

object.__exit__

After successful entry the exit method closes the context and can determine whether an exception propagates.

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

object.__gt__

The method implements strict greater-than comparison and may decline with NotImplemented.

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

object.__init__

The initializer sets state on an already created instance and must return None.

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

object.__iter__

The iteration method returns an iterator over the object’s elements.

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

object.__le__

The method defines less-than-or-equal and can express a partial order.

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

object.__lt__

The strict less-than method supplies the comparison used by sorting.

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

object.__repr__

The representation method returns a string intended to identify an object unambiguously during debugging.

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

object.__str__

The string conversion method supplies a readable display form of an object.

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

operator.itemgetter

Creates a callable object that later retrieves items from its operand.

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

pstats.Stats — analyzing profiling results

pstats.Stats analyzes profiler data by sorting function statistics and producing reports. It does not measure execution itself; it accepts a saved profile or a profiler object.

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

pstats.Stats.stats — raw profiling statistics

pstats.Stats.stats is a dictionary of profiling data keyed by filename, line number, and function name. Read call counts, internal time, cumulative time, and caller information directly instead of parsing a text report.

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

re.compile

Compiles a regular expression into a reusable pattern object.

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

re.escape

Quotes regular-expression metacharacters so that input is matched literally inside a pattern.

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

re.findall

Collects all non-overlapping matches, changing the result shape according to capturing groups.

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

re.finditer

Yields match objects for successive non-overlapping matches.

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