https://www.cnblogs.com/ibingshan/p/10303794.html
from enum import Enum
class testEnum(int,Enum):
key1 = 0
key2 = 1
"key1" in testEnum.__members__
0 in testEnum._value2member_map_
最后
以上就是欣喜啤酒最近收集整理的关于python enum 判断key 或者value是否存在的全部内容,更多相关python内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复