Make The Following File:
nano generator.py
#!/bin/python3
import random
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!$' #You Can Add Or Remove Chars
length = input('Length Of Password?' )
length = int(length)
password = ''
for c in range(length):
password += random.choice(chars)
print(password)
To Run Script:
python generator.py