
6. Expressions — Python 3.13.3 documentation
1 day ago · If the slice list contains at least one comma, the key is a tuple containing the conversion of the slice items; otherwise, the conversion of the lone slice item is the key. The conversion of a slice item that is an expression is that expression.
Slice Objects — Python 3.13.3 documentation
4 days ago · int PySlice_Unpack (PyObject * slice, Py_ssize_t * start, Py_ssize_t * stop, Py_ssize_t * step) ¶ Part of the Stable ABI since version 3.7. Extract the start, stop and step data members from a slice object as C integers.
5. Data Structures — Python 3.13.3 documentation
2 days ago · The optional arguments start and end are interpreted as in the slice notation and are used to limit the search to a particular subsequence of the list. The returned index is computed relative to the beginning of the full sequence rather than the start argument.
typing — Support for type hints — Python 3.13.3 documentation
2 days ago · Unpack ¶ Typing operator to conceptually mark an object as having been unpacked. For example, using the unpack operator * on a type variable tuple is equivalent to using Unpack to mark the type variable tuple as having been unpacked:
operator — Standard operators as functions — Python 3.13.3 …
1 day ago · The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. Many function names are those used for special methods, without the double underscores.
struct — Interpret bytes as packed binary data — Python 3.13.3 ...
2 days ago · unpack_from (buffer, offset = 0) ¶ Identical to the unpack_from() function, using the compiled format. The buffer’s size in bytes, starting at position offset, must be at least size. iter_unpack (buffer) ¶ Identical to the iter_unpack() function, using the compiled format.
3. An Informal Introduction to Python
1 day ago · In addition to indexing, slicing is also supported. While indexing is used to obtain individual characters, slicing allows you to obtain a substring: >>> word [ 0 : 2 ] # characters from position 0 (included) to 2 (excluded) 'Py' >>> word [ 2 : 5 ] # characters from position 2 (included) to 5 (excluded) 'tho'
Functions creating iterators for efficient looping - Python
1 day ago · Make an iterator that returns selected elements from the iterable. Works like sequence slicing but does not support negative values for start, stop, or step. If start is zero or None, iteration starts at zero. Otherwise, elements from the …
string — Common string operations — Python 3.13.3 …
2 days ago · This function does the actual work of formatting. It is exposed as a separate function for cases where you want to pass in a predefined dictionary of arguments, rather than unpacking and repacking the dictionary as individual arguments using the *args and **kwargs syntax.
MemoryView objects — Python 3.13.3 documentation
2 days ago · A memoryview object exposes the C level buffer interface as a Python object which can then be passed around like any other object. PyObject * PyMemoryView_FromObject ( PyObject * obj ) ¶ Return value: New reference.