Source Code:
(back to article)
from enum import Enum Color = Enum('Color', ['RED', 'GREEN', 'BLUE']) print(Color.RED)
Result:
Report an issue