This python program uses the string module to get a string of all the upper and lower case letters, digits, and punctuation characters then uses the random, sample function to choose "length" random elements from this string and joins them together to form the password
You can customize the length of the password by passing in a different value for the length parameter when calling the generate password" function.
For example, to generate a 16 character password, you can call "generate password(16)"