4 Matching Annotations
  1. Oct 2024
    1. a sequence (such as a list or string)

      ... an iterable. This includes sets, dictionaries (the iteration will yield keys, values or key-value-pairs), and generators (such as ranges)

    1. String

      also mutable.

    2. range

      Ranges do not technically store the items. Instead, a range generates them in the order that they are requested. This allows you to work through absurdly long ranges of numbers without having to keep each one in memory. On the flip side, accessing an element towards the end of a range may take much longer than accessing the same element in a list of the same length.

    1. Be aware

      Also be aware of identifiers of built-in functions and types that can be overwritten by accident (e.g. zip, range, open, list, set, ...)