• 第34月第25天 十六进制整数与ASCii编码字符


    1.

    十六进制整数与ASCii编码字符

    # -*- coding: utf-8 -*-
    import binascii
    #16进制整数转ASCii编码字符串
    a = 0x665554
    b = hex(a) #转换成相同的字符串即'0x665554'
    b = b[2:]  #截取掉'0x'
    c = binascii.a2b_hex(b) #转换成ASCii编码的字符串
     

    c = binascii.a2b_hex(b);print(c)

  • 相关阅读:
    Path Sum
    Restore IP Addresses
    Subsets II
    N-Queens
    Subsets
    Combination Sum II
    Combination Sum
    Sudoku Solver
    Valid Sudoku
    【贪心】【Uva11292】 勇者斗恶龙
  • 原文地址:https://www.cnblogs.com/javastart/p/11244782.html
Copyright © 2020-2023  润新知