How to Create a Random String

Random strings are used everywhere in computing -- mostly as keys for cryptographic signing sensitive data. So how does one go about creating one? My first thinking was to use Python code and its random library. I came up with this import string import random def gen_random_string(length=32, charset=string …