--Iterable --Can be turned with a for
statement
--Iterator --len ()
cannot
- enumerate
, zip
, map
, filter
--ʻItertools function return value - file object --Generator --Return value of generator expression / function --Collection --
len () can be done -
array.array -
enum.Enum --Sequence --Index and slice can be used -
list,
str,
range -
collections.deque -
tuple --Return value of
collections.namedtuple () --Set --Set operations can be used -
set,
frozenset --Mapping --key and value are defined -
dict -
collections.defaultdict,
collections.Counter -
collections.ChainMap`
decimal.Decimal
--Arbitrary precision floating point number
complex
fraction.Fraction
--Fraction
float
int
bool
abc --- abstract base class etc.
Recommended Posts