a = 0#d =[]
for i in range(1,5):
for j in range(1,5):
for k in range(1,5):
if (i != j) and (j != k) and (i != k):
a+=1# d.append([i,j,k])
print (i,j,k)
print("zhongshushi:",a)
#or 另一个例子
from itertools import permutations#itertoos 内置的迭代器
for i in permutations([1, 2, 3, 4], 3):
print(i)
网友评论