Skip to content

Instantly share code, notes, and snippets.

@deepanshumehtaa
Last active March 5, 2025 05:20
Show Gist options
  • Save deepanshumehtaa/6d9eb9b2fe938aa3cf96b195ad04bd94 to your computer and use it in GitHub Desktop.
Save deepanshumehtaa/6d9eb9b2fe938aa3cf96b195ad04bd94 to your computer and use it in GitHub Desktop.
Enums Python.py
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