Posted on 28th April 2025|43 views
Can you explain me the best way to implement enums in Python?
Posted on 28th April 2025| views
Hey Divija,
You can try the following method:
from enum import Enum
class Class(Enum):
A = 1
B= 2
C = 3
print(repr(Class.a))