求一个数组的全排列?
from sys import stdout
def perm(li, start, end):
if(start == end):
print li
else:
for i in range(start, end):
li[start], li[i] = li[i], li[start]
perm(li, start+1, end)
li[i], li[start] = li[start], li[i]
if __name__ == '__main__':
li = ['a','b','c','d']
perm(li, 0, len(li))