from itertoolsimport combinations, permutations
def wuxingsanma():
#下面產(chǎn)生五星三碼的組合淹朋。針對(duì)輸入的數(shù)字,輸出五星三碼
? ? aa ='15047'
? ? list1 =set(list(aa))#轉(zhuǎn)換成列表,并實(shí)現(xiàn)去重
# print(list1)
? ? for iin itertools.combinations(list1,3):
print(''.join(i))
in_haoma = ['150','051','057']
out_haoma= []
#根據(jù)輸入數(shù)字呻率,生成數(shù)字全排列
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=' ')