#!/usr/local/bin/python3 from random import SystemRandom choices = SystemRandom().choices s = frozenset('0123456789') join = ''.join for i in range(10000): join(choices(list(s), k=8)) print(join(choices(tuple(s), k=8)))