Posted on 24th July 2024|43 views
Can you explain me the best way to implement enums in Python?
Posted on 24th July 2024| 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))