Last active
March 5, 2025 05:20
-
-
Save deepanshumehtaa/6d9eb9b2fe938aa3cf96b195ad04bd94 to your computer and use it in GitHub Desktop.
Enums Python.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
class Xyz(Enum): | |
"""Xyz._member_map_.values()""" | |
A = 100 | |
B = 200 | |
# Key: Pair of Enums | |
map = Xyz._member_map_ | |
print(map["A"].value) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment