Python · Dictionaries, tuples and sets

Lookup tables

Unit conversions, prices and element data are tables, and a dictionary turns a long chain of tests into one lookup.