I come across this Answer utilizing a dictionary instead classy, powerful and pythonic. Early optimisations are evil anyway so let's Have a very dict and find out afterwards it it is a bottleneck.See the descriptions on the Distinctive methods that outline descriptors close to the very first paragraph of the respond to for more descriptive variable