基本算法4
全排列: s=['a','b','c'] from copy import copy ret=[] len_input=len(s) def changes(s,start,end): if end <1: ret.append( copy(s)) return for i in range(end): s[start],s[start+i]=s[start+i],s[start] changes(s,start+1,end-1) s[start],s[start+i]=s[start+i],s[start]