About 344 results
Open links in new tab
  1. 5. Data Structures — Python 3.13.5 documentation

    2 days ago · Performing list(d) on a dictionary returns a list of all the keys used in the dictionary, in insertion order (if you want it sorted, just use sorted(d) instead). To check whether a single key …

  2. collections — Container datatypes — Python 3.13.5 documentation

    3 days ago · This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple. namedtuple() factory …

  3. typing — Support for type hints — Python 3.13.5 documentation

    3 days ago · The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types, a ParamSpec, Concatenate, …

  4. Built-in Types — Python 3.13.5 documentation

    3 days ago · For example, list('abc') returns ['a', 'b', 'c'] and list((1, 2, 3)) returns [1, 2, 3]. If no argument is given, the constructor creates a new empty list, []. Many other operations also …

  5. pprint — Data pretty printer — Python 3.13.5 documentation

    3 days ago · The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter. If the formatted structures …

  6. Sorting Techniques — Python 3.13.5 documentation

    3 days ago · Python lists have a built-in list.sort() method that modifies the list in-place. There is also a sorted() built-in function that builds a new sorted list from an iterable. In this document, …

  7. copy — Shallow and deep copy operations — Python 3.13.5 …

    3 days ago · Shallow copies of dictionaries can be made using dict.copy(), and of lists by assigning a slice of the entire list, for example, copied_list = original_list[:]. Classes can use …

  8. 6. Expressions — Python 3.13.5 documentation

    3 days ago · Displays for lists, sets and dictionaries¶ For constructing a list, a set or a dictionary Python provides special syntax called “displays”, each of them in two flavors: either the …

  9. 3. Data model — Python 3.11.12 documentation

    Examples of containers are tuples, lists and dictionaries. The references are part of a container’s value.

  10. dataclasses — Data Classes — Python 3.8.20 documentation

    Converts the dataclass instance to a dict (by using the factory function dict_factory). Each dataclass is converted to a dict of its fields, as name: value pairs. dataclasses, dicts, lists, and …