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.count

Counts non-overlapping occurrences of a substring within the selected range.

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

str.encode

Encodes Unicode text as bytes in a chosen character encoding.

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

str.endswith

Tests whether a string ends with a suffix or any suffix in a tuple.

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

str.find

Returns the lowest matching substring index within the search bounds.

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

str.format

Substitutes positional or named fields and applies each field’s format specification.

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

str.format_map

Resolves named replacement fields directly against a supplied mapping.

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

str.index

Returns the lowest index at which the substring occurs in the search interval.

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

str.isalnum

Tests whether every character is alphabetic or numeric and at least one character exists.

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

str.isalpha

Tests whether a nonempty string consists entirely of Unicode letters.

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

str.isdigit

Tests whether every character is a Unicode digit and the string is nonempty.

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

str.isspace

Recognizes nonempty strings containing only Unicode whitespace.

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

str.join

Places the separator between successive strings from an iterable.

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

str.lower

Returns a lowercase Unicode copy of a string.

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

str.lstrip

Removes a run of characters from the left edge while each belongs to the supplied set.

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

str.removeprefix

Removes one exact prefix when it is present.

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

str.removesuffix

Removes one exact suffix when it is present.

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

str.replace

Replaces occurrences of a literal substring, optionally stopping after a maximum number.

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

str.rfind

Finds the highest starting index of a matching substring.

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

str.rsplit

Splits a string starting at the right, subject to the split limit.

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

str.rstrip

Removes trailing characters as long as each belongs to the supplied character set.

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

str.split

Splits text into fields using whitespace or an explicit separator.

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

str.splitlines

Splits text at recognized line boundaries, optionally retaining line endings.

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

str.startswith

Tests a literal prefix or tuple of prefixes at the beginning of the given interval.

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

str.strip

Removes matching characters from both ends of a string.

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