Does the enum module help? https://docs.python.org/3/library/enum.html Note that within __init__ you can reference your enumerated constants using (for example) self.KA. Skip