def nth(iterable, n, default=None):
    """Returns the nth item or a default value"""
return next(itertools.islice(iterable, n, None), default)
print(nth(lucky(), 100))
Find the nth lucky number generated by a sieve in Python