题目1:有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
一:
count=0
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 k!=i:
count+=1 print(i,k,j)
二:
list=[1,2,3,4]
list_num=[i*100+j*10+k for i in list for j in list for k in list if(i!=j j!=k k!=j)]
print(i,j,k)
题目二: