如题所述
import random
a=[]
while len(a)<20:
t=random.randint(1000,2000)
if t%7==0 and t not in a:
a.append(t)
print(a)