I\'m new to Python. Would you please tell me what\'s wrong with the following code? When I run it, I got an error message of \"NameError: global name \'reduce\' is not defin
Also
# Import reduce from functools from functools import reduce
Allows you to use reduce as though it were a built in function.
reduce
def main(): def add(x,y): return x+y reduce(add, range(1, 11))