while s!=10000:
s = random.choice(a) + random.choice(a) + random.choice(a) + random.choice(a) + random.choice(a) + random.choice(a)
print (s)
import random
a = list(range(10000))
while s := (sum(l := [random.choice(a) for _ in range(6)])) != 10000:
print(s, l)