enum in python

Enumerations in Python are implemented by using the module named “enum“. Enumerations are created using classes. Enums have names and values associated with them.
Properties of enum:
* Enums can be displayed as string or repr.
* Enums can be checked for their types using type().
* “name” keyword is used to display the name of the enum member.
```
import enum
 
class Animal(enum.Enum):
    dog = 1
    cat = 2
    lion = 3
 
print (Animal.dog) // Animal.dog
print (repr(Animal.dog)) // <Animal.dog: 1>
print (type(Animal.dog)) // <enum 'Animal'>
print (Animal.dog.name) // dog
```