The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Generate A Random String In Python

TODO: Pull subtitle into page object
Code
import string
import random

def random_string(string_length):
    random_set = string.ascii_letters + string.digits + string.punctuation
    letters = string.ascii_letters
    random_string = ''.join(random.SystemRandom().choice(random_set) for _ in range(string_length))
    return random_string

def random_string_min_max(min, max):
    random_set = string.ascii_letters + string.digits + string.punctuation
    letters = string.ascii_letters
    random_string = ''.join(random.SystemRandom().choice(random_set) for _ in range(random.randint(min,max)))
    return random_string

print(random_string(12))    

print(random_string_min_max(8,20))
Results
1K*fV~X%~[^M
MF(ek#_E\zMiAZ

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Generate A Random String In Python

-- code
-- python

import string
import random

def random_string(string_length):
    random_set = string.ascii_letters + string.digits + string.punctuation
    letters = string.ascii_letters
    random_string = ''.join(random.SystemRandom().choice(random_set) for _ in range(string_length))
    return random_string

def random_string_min_max(min, max):
    random_set = string.ascii_letters + string.digits + string.punctuation
    letters = string.ascii_letters
    random_string = ''.join(random.SystemRandom().choice(random_set) for _ in range(random.randint(min,max)))
    return random_string

print(random_string(12))    

print(random_string_min_max(8,20))

-- results/

1K*fV~X%~[^M
MF(ek#_E\zMiAZ

-- /results


-- categories
-- Python 

-- metadata
-- date: 2019-07-05 10:43:27
-- id: 01df19e2
-- status: published
-- type: post
-- site: aws