(length=4, seed=None)
return int("".join(choice(string.digits if _ != 0 else string.digits.replace('0', '')) for _ in xrange(0, length)))
Returns random integer value with provided number of digits

    >>> random.seed(0)
    >>> randomInt(6)
    874254
Returns random integer value with provided number of digits
Returns random integer value with provided number of digits
def randomInt(length=4, seed=None):
    """
    Returns random integer value with provided number of digits

    >>> random.seed(0)
    >>> randomInt(6)
    874254
    """

    choice = random.WichmannHill(seed).choice if seed is not None else random.choice

    return int("".join(choice(string.digits if _ != 0 else string.digits.replace('0', '')) for _ in xrange(0, length)))
def randomInt ( length = 4 , seed = None ) : choice = random . WichmannHill ( seed ) . choice if seed is not None else random . choice return int ( "" . join ( choice ( string . digits if _ != 0 else string . digits . replace ( '0' , '' ) ) for _ in xrange ( 0 , length ) ) )