#全排列
#arr 减一个元素,放入new_arr中
def allpai(arr,new_arr):
if len(new_arr)==4:
print(new_arr)
return
for i in range(len(arr)):
temp_new=new_arr+[arr[i]]
temp_arr=arr[:i]+ arr[i+1:]
allpai(temp_arr,temp_new)
new_arr=[]
arr=["a","b","c","d"]
allpai(arr,new_arr)