4 Matching Annotations
- Oct 2024
-
fcichos.github.io fcichos.github.io
-
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)
-
-
fcichos.github.io fcichos.github.io
-
String
also mutable.
-
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.
-
-
fcichos.github.io fcichos.github.io
-
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
, ...)
-