zoukankan      html  css  js  c++  java
  • python把&#DDDDDD转换为中文

    在工作中,可能会遇到这种编码

    s = '4、趁着年轻,有精力,能去多远走多远,能怎么折腾就怎么折腾,当然是要注意安全了'
    

    如何把这种编码的转换为中文呢,这时候就需要html模块,它是python自带的模块

    import html
    s = '4、趁着年轻,有精力,能去多远走多远,能怎么折腾就怎么折腾,当然是要注意安全了'
    print(html.unescape(s))
    # 输出:
    # 4、趁着年轻,有精力,能去多远走多远,能怎么折腾就怎么折腾,当然是要注意安全了
    
  • 相关阅读:
    左偏树
    论在Windows下远程连接Ubuntu
    ZOJ 3711 Give Me Your Hand
    SGU 495. Kids and Prizes
    POJ 2151 Check the difficulty of problems
    CodeForces 148D. Bag of mice
    HDU 3631 Shortest Path
    HDU 1869 六度分离
    HDU 2544 最短路
    HDU 3584 Cube
  • 原文地址:https://www.cnblogs.com/hziwei/p/13470345.html
Copyright © 2011-2022 走看看