lookup#
- ParamDict1D.lookup(key)#
Get the parameter value for the specified key, or zero if it is not found.
- Parameters:
- keykey
- Returns:
- int or float
Examples
>>> inventory = ParamDict1D({'chair': 100, 'table': 10, 'shelf': 5, 'sofa': 3}) >>> inventory.lookup('chair') 100 >>> inventory.lookup('desk') 0