[Solution found!] 您可以使用IntEnum: from enum import IntEnum class Color(IntEnum): RED = 1 BLUE = 2 print(int(Color.RED)) # prints…
確定! 回上一頁