Python program to generate passwords