When using Enum, your number = "1" is considered as one of the enum entry.
So, firstly, it is thought to be used this way, for example :
from enum import Enum class Number(Enum): numberOne = "1" numberTwo = "2"
By the way, when you access to Number.number, you access to the "enum item", which is more than just the value. The item has, indeed, a name (number) and a value ("1").
So, in theory, the good way to change the value should be :
Number.number.value = "2"
But, in any was, an Enum is made to not be mutable. So you can't do that anyway.
Enum, why do you need to change it?Enumis designed to be set of named constants. Logic you described is quite different, maybe you should use simple class?