The aim is to use an Enum class to allow for predictable input of a definite amount of options.
I expected to get the integers as output, however I get class.attrib if I print it.
How can I get the integer instead?
from enum import Enum
class Stiffness(Enum):
FREE = 0
RIGID = 1
FLEXIBLE = 2
print(Stiffness.FLEXIBLE)
Output: Stiffness.FLEXIBLE
Expected output: 2