Python password generator code

To run the code inside the terminal type: python filename.py Handy script to generate a random password based on user-defined rules (upper and lower letters, umber of special characters, length,..)…