Here are some examples of working with enumerations:
Defining an enumeration
Importing an enumeration
Provided the enumeration above is created and saved in a file named status.py, you can import it as follows:
Creating a variable of type Status with value OPEN
Setting the status with a numeric value
Checking the value of the enum variable
See all available values for the enumeration status
Accessing the enum by numeric value: Status(1)
Accessing an enum value that does not exist: Status(4) should not exist
Checking if a potential member is really a member of an enum
Retrieving the value of an enum member
Further resources
My python challenge