我有這個簡單的代碼返回標題中的內容。爲什麼陣列不打印?這不僅僅是一個itertools
問題我也注意到它只是返回對象位置的其他代碼。Python在0x10049b470處返回`<itertools.combinations對象>` - 如何訪問此?
這是代碼。我正在運行2.7.1,一個enthought分配(pylab) - 使用它的類。
import itertools
number = [53, 64, 68, 71, 77, 82, 85]
print itertools.combinations(number, 4)
我把你的問題標記爲'家庭作業',因爲你提到'使用它作爲課堂' - 讓我知道如果這實際上不是這個特定的問題。 – phooji 2011-03-03 03:19:40