PyDocs

Community-powered documentation and examples for Python

    Example of the daygc/is_tracked
    >>> gc.is_tracked(0)
    False
    >>> gc.is_tracked("a")
    False
    >>> gc.is_tracked([])
    True
    >>> gc.is_tracked({})
    False
    >>> gc.is_tracked({"a": 1})
    True
    Recently Updated
    ertugrulcetin edited an example for builtins/str.split 11 days ago.
    ertugrulcetin authored an example for builtins/str.split 11 days ago.
    Contribute to PyDocs

    Give feedback, add examples, or link related functions.

    Learn how to pitch in →
    Python, by purpose
    Full quick reference →

    Strings58

    str
    Create a new string object from the give…
    repr
    Return the canonical string representati…
    ascii
    Return an ASCII-only representation of a…
    chr
    Return a Unicode string of one character…
    ord
    Return the ordinal value of a character.
    format
    Return type(value).__format__(value, for…
    str.format
    Return a formatted version of the string…
    str.format_map
    Return a formatted version of the string…
    str.startswith
    Return True if the string starts with th…
    str.endswith
    Return True if the string ends with the…

    Lists21

    list
    Built-in mutable sequence.
    range
    Return an object that produces a sequenc…
    list.copy
    Return a shallow copy of the list.
    list.append
    Append object to the end of the list.
    list.extend
    Extend list by appending elements from t…
    list.insert
    Insert object before index.
    list.remove
    Remove first occurrence of value.
    list.pop
    Remove and return item at index (default…
    list.clear
    Remove all items from list.
    list.sort
    Sort the list in ascending order and ret…

    Dictionaries18

    dict
    (key, value) pairs dict(iterable) -> new…
    dict.fromkeys
    Create a new dictionary with keys from i…
    dict.copy
    Return a shallow copy of the dict.
    dict.get
    Return the value for key if key is in th…
    dict.keys
    Return a set-like object providing a vie…
    dict.values
    Return an object providing a view on the…
    dict.items
    Return a set-like object providing a vie…
    dict.setdefault
    Insert key with a value of default if ke…
    dict.update
    If E is present and has a .keys() method…
    dict.pop
    If the key is not found, return the defa…

    Iteration15

    iter
    Get an iterator from an object.
    next
    Return the next item from the iterator.
    enumerate
    Return an enumerate object.
    zip
    The zip object yields n-length tuples, w…
    range
    Return an object that produces a sequenc…
    reversed
    Return a reverse iterator over the value…
    sorted
    Return a new list containing all items f…
    len
    Return the number of items in a containe…
    map
    Make an iterator that computes the funct…
    filter
    Return an iterator yielding those items…

    os.path

    Operations on pathnames.

    joinexistsbasenamesplitext

    itertools

    Functions creating iterators for efficient looping.

    chaingroupbyproductislice

    functools

    Higher-order functions and operations on callable objects.

    partialreducelru_cachewraps

    re

    Regular expression operations.

    searchsubfindallcompile

    json

    Encode and decode the JSON format.

    dumpsloadsdumpload

    pathlib

    Object-oriented filesystem paths

    PathPath.read_textPath.globPath.mkdir