Karsa
2013-09-18 23:13:34 +08:00
<code>
def pickOne (array1, array2) :
length = len (array2)
if length == 0 :
return
for i in range (0, length) :
tempArray1 = array1[:]
tempArray2 = array2[:]
moveArrayItem (tempArray1, tempArray2, i)
print (tempArray1)
pickOne (tempArray1, tempArray2)
def moveArrayItem (array1, array2, index) :
if index < len(array2) :
array1.append (array2.pop(index))
array = [1,2,3,4,5,6]
tempArray = []
pickOne (tempArray, array)
</code>