def ones_and_zeros(digits):
 return bin(random.getrandbits(digits)).lstrip('0b').zfill(digits)

def ones_and_zeros ( digits ) : return bin ( random . getrandbits ( digits ) ) . lstrip ( '0b' ) . zfill ( digits )
express n in at least d binary digits .