from itertools import permutations a=permutations('LANQIAO')#a是全排列 set(a) #全排列去重 print(len(a))#输出不重复的全排列 set(全排列)可以去重