Python convert Tuple to Integer

integer, python, tuples

Solution

>>> reduce(lambda rst, d: rst * 10 + d, (1, 2, 3))
123

Problem

Is there any function that can convert a tuple into an integer? Example: ``` input = (1, 3, 7) output = 137 ```

Original source