def random_numbers ( n ) : return '' . join ( random . SystemRandom ( ) . choice ( string . digits ) for _ in range ( n ) )
how to generate n diffreent random numbers in a range python
Generate a random string from 0 - 9 : param n : length of the string : return : the random string
def random_numbers(n):
    """
    Generate a random string from 0-9
    :param n: length of the string
    :return: the random string
    """
    return ''.join(random.SystemRandom().choice(string.digits) for _ in range(n))