import random def gen_password(length,num,spec): charpool="abcdefghijklmnopqrstuvwxyz" numbers="0123456789" specials="!@#$%^&*()[]{}<>,.?/:;" if num == 1: charpool += numbers if spec == 1: charpool += specials password="" i=0 while i