Jan-06-2020, 02:32 AM
Analysis looks correct. A nested dict (just like the one you used in post #11) should work. Note that my code assumed a list of number ranges, and I also messed up the call to in_range. It should be more like this for nested dicts:
def find_range(n): for num_range in _number_ranges.values(): if in_range(n, num_range): break return num_range
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures