from itertoolsimport combinations, permutations
def wuxingsanma():
#下面产生五星三码的组合。针对输入的数字,输出五星三码
aa ='15047'
list1 =set(list(aa))#转换成列表,并实现去重
# print(list1)
for iin itertools.combinations(list1,3):
print(''.join(i))
in_haoma = ['150','051','057']
out_haoma= []
#根据输入数字,生成数字全排列
for iin in_haoma:
cc =list(i)
aa =list(permutations(cc,3))
for min aa:
bb = m[0]+m[1]+m[2]
out_haoma.append(bb)
print(set(out_haoma))
for iin out_haoma:
if iin content:
print(i,end=' ')