(n,count=16,reverse=False)
return "".join(bits)
Display n in binary (only difference from built-in `bin` is
        that this function returns a fixed width string and can
        optionally be reversed

        >>> binary(6789)
        '0001101010000101'
        >>> binary(6789,8)
        '10000101'
        >>> binary(6789,reverse=True)
        '1010000101011000'
Display n in binary (only difference from built-in `bin` is
        that this function returns a fixed width string and can
        optionally be reversed
Display n in binary ( only difference from built - in bin is that this function returns a fixed width string and can optionally be reversed
def binary(n,count=16,reverse=False):
    """
        Display n in binary (only difference from built-in `bin` is
        that this function returns a fixed width string and can
        optionally be reversed

        >>> binary(6789)
        '0001101010000101'
        >>> binary(6789,8)
        '10000101'
        >>> binary(6789,reverse=True)
        '1010000101011000'

    """
    bits = [str((n >> y) & 1) for y in range(count-1, -1, -1)]
    if reverse:
        bits.reverse()
    return "".join(bits)
def binary ( n , count = 16 , reverse = False ) : bits = [ str ( ( n >> y ) & 1 ) for y in range ( count - 1 , - 1 , - 1 ) ] if reverse : bits . reverse ( ) return "" . join ( bits )