被自己蠢哭
def allsort(A):
if len(A) == 1:
return A
else:
result =[]
for i in range(len(A)):
temp = A[:i]+A[i+1:]
for t in allsort(temp):
result.append(A[i]+t)
return result
if __name__ == "__main__":
A = "abc" # (list)(input("请输入需要进行全排列的字符串:"))
print(allsort(A))