(length=4, lowercase=False, alphabet=None, seed=None)
return retVal
Returns random string value with provided number of characters

    >>> random.seed(0)
    >>> randomStr(6)
    'RNvnAv'
Returns random string value with provided number of characters
Returns random string value with provided number of characters
def randomStr(length=4, lowercase=False, alphabet=None, seed=None):
    """
    Returns random string value with provided number of characters

    >>> random.seed(0)
    >>> randomStr(6)
    'RNvnAv'
    """

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

    if alphabet:
        retVal = "".join(choice(alphabet) for _ in xrange(0, length))
    elif lowercase:
        retVal = "".join(choice(string.ascii_lowercase) for _ in xrange(0, length))
    else:
        retVal = "".join(choice(string.ascii_letters) for _ in xrange(0, length))

    return retVal
def randomStr ( length = 4 , lowercase = False , alphabet = None , seed = None ) : choice = random . WichmannHill ( seed ) . choice if seed is not None else random . choice if alphabet : retVal = "" . join ( choice ( alphabet ) for _ in xrange ( 0 , length ) ) elif lowercase : retVal = "" . join ( choice ( string . ascii_lowercase ) for _ in xrange ( 0 , length ) ) else : retVal = "" . join ( choice ( string . ascii_letters ) for _ in xrange ( 0 , length ) ) return retVal