Python 3.2.3 IDLE を使用しています。reduce コマンドを使用している人がいますが、何らかの理由でそれを持っていません。コードが紫色で表示されず、reduce が変数として認識されるように。
ここに私のコードの一部があります:
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
の重複を削除した後、基本的にリストを増やしたいと思いnumbertotal
ます。