import timeit
print(timeit.timeit("reduce(add, a)", "from functools import reduce;from operator import add;a = ['x'] * 10"))
print(timeit.timeit("str.join('', a)", "from functools import reduce;from operator import add;a = ['x'] * 10"))
aW1wb3J0IHRpbWVpdAoKCnByaW50KHRpbWVpdC50aW1laXQoInJlZHVjZShhZGQsIGEpIiwgImZyb20gZnVuY3Rvb2xzIGltcG9ydCByZWR1Y2U7ZnJvbSBvcGVyYXRvciBpbXBvcnQgYWRkO2EgPSBbJ3gnXSAqIDEwIikpCnByaW50KHRpbWVpdC50aW1laXQoInN0ci5qb2luKCcnLCBhKSIsICJmcm9tIGZ1bmN0b29scyBpbXBvcnQgcmVkdWNlO2Zyb20gb3BlcmF0b3IgaW1wb3J0IGFkZDthID0gWyd4J10gKiAxMCIpKQ==