print(timeit.timeit('int("".join(map(str, x)))', setup))
print(timeit.timeit('sum(d * 10**i for i, d in enumerate(x[::-1]))', setup))
setup = (
    """from functools import reduce; x=2*[5, 2, 6, 8, 4, 6, 6, 4, 8, 0, 3, 1, 7, 6, 8, 2, 9, 9, 9, 5, 4, 5, 5, 4, 3, 6, 9, 2, 2, 1]"""
    )
print(timeit.timeit('reduce(lambda t,d: 10*t+d, x, 0)', setup))
print(timeit.timeit('int("".join(map(str, x)))', setup))
print(timeit.timeit('sum(d * 10**i for i, d in enumerate(x[::-1]))', setup))
setup = (
    """from functools import reduce; x=4*[5, 2, 6, 8, 4, 6, 6, 4, 8, 0, 3, 1, 7, 6, 8, 2, 9, 9, 9, 5, 4, 5, 5, 4, 3, 6, 9, 2, 2, 1]"""
    )
print(timeit.timeit('reduce(lambda t,d: 10*t+d, x, 0)', setup))
print(timeit.timeit('int("".join(map(str, x)))', setup))
print(timeit.timeit('sum(d * 10**i for i, d in enumerate(x[::-1]))', setup))
How to convert a list of multiple integers into a single integer?