What are the two output lines?

from functools
Python 3.14 intermediate 2 min

What are the two output lines?

Python
from functools import reduce

def append_digit(total, digit):
    return total * 10 + digit

print(reduce(append_digit, [], 7))
print(reduce(append_digit, [2, 3], 1))
Open in playground
Report an error