An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over. from enum import Enum class Fruit(Enum): apple = 1 banana = 2 orange = 3 list(Fruit) # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>] len(Fruit) # 3 Fruit.banana # <Fruit.banana: 2> Fruit[‘ba
![enum34 : Python Package Index](https://cdn-ak-scissors.b.st-hatena.com/image/square/3ac04ce0305e3030bdd33bedf497bffb84a0bb3d/height=288;version=1;width=512/https%3A%2F%2Fpypi.org%2Fstatic%2Fimages%2Ftwitter.abaf4b19.webp)