麻烦注释一下,还有思路大概是怎样的。
我大概只想到了以下,也不知道对不对
def num(i):
for I in range(1000,10000):
a=str(i)
b=list(a)
return len(a)!=len(set(b))
麻烦注释一下,还有思路大概是怎样的。
我大概只想到了以下,也不知道对不对
def num(i):
for I in range(1000,10000):
a=str(i)
b=list(a)
return len(a)!=len(set(b))
def num():
cout = 0
for i in range(1000,10000):
a=str(i)
b=list(a)
if len(a)!=len(set(b)):
continue
else:
cout += 1
return cout
print(num())