

6·
22 hours agoimport random
password_length=10
letters = "abcdefghijklmnopqrstuvwxyz0123456789-&@$?!*#%"
print(''.join(random.sample(letters+letters+letters.upper()+letters.upper(), password_length)))
If you inline password_length and letters, you can bring it down to 2 lines
golfing is fun! I do everything in a single line