def dec2bin(n):
    """
    A foolishly simple look-up method of getting binary string from an integer
    This happens to be faster than all other ways!!!
    """
    # =========================================================
    # create hex of int, remove '0x'. now for each hex char,
    # look up binary string, append in list and join at the end.
    # =========================================================
    return ''.join([hexDict[hstr] for hstr in hex(n)[2:]])

    A foolishly simple look-up method of getting binary string from an integer
    This happens to be faster than all other ways!!!
    
recipes/Python/576847_Converty_decimalinteger_number_binary_string/recipe-576847.py