Answers for "what is enum in python why it is used"

3

enum python

>>> from enum import Enum
>>> class Color(Enum):
...     RED = 1
...     GREEN = 2
...     BLUE = 3
...
Posted by: Guest on April-23-2021

Code answers related to "what is enum in python why it is used"

Python Answers by Framework

Browse Popular Code Answers by Language