Python's lack of a 'switch' statement has garnered much discussion and even a PEP. The most popular substitute uses dictionaries to map cases to functions, which requires lots of defs or lambdas. While the approach shown in this script may be O(n) for cases, it aims to duplicate C's original 'switch' functionality ...