I’m using Python 3.2.3 IDLE. I see some people using the reduce commmand but for some reason I don’t have it. Like the code doesn’t come up in purple and it recognizes reduce as a variable.
Here’s part of my code:
numbers = [10, 11, 11]
numbertotal = (set(numbers))
#removes duplicates in my list, therefore, the list only contains [10, 11]
print ("The sum of the list is", (sum(numbertotal))) #sum is 21
print ("The product of the list is" #need help here, basically it should be 10 * 11 = 110
I basically want to multiply the list after I remove the duplicates in numbertotal.
Your
reducehides in:or
In python3 it has been moved to
functools. The2to3handles this case.