python: encode and decode

Posted ®Geovin Du Dream Park™

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python: encode and decode相关的知识,希望对你有一定的参考价值。

import binascii

  

    geovin=b"geovindu"
    adu=base64.b64encode(geovin) #加密码
    print(adu)
    edu=base64.b64decode(adu) #解密
    print(edu)

  

    s=["医疗",400,1]
    column=(\'InsuranceName\',\'InsuranceCost\',\'IMonth\')
    tbname="InsuranceMoney"
    vls = str(s).replace("[", "").replace("]", "")
    cls = str(column).replace("\'", "").replace("\'", "")
    sqlstring = f"insert into tbname cls values (vls)"
    print(sqlstring)

  

 

以上是关于python: encode and decode的主要内容,如果未能解决你的问题,请参考以下文章

Encode and Decode TinyURL

[LeetCode] Encode and Decode TinyURL

535. Encode and Decode TinyURL

535. Encode and Decode TinyURL

Leetcode 535: Encode and Decode TinyURL

271. Encode and Decode Strings