Python 转换为 URL 编码格式

from urllib.parse import quote

def convert(content):
    return quote("待转换的内容")


if __name__ == "__main__":
    while True:
        content = input("请输入待转换的内容:")
        
        target = convert(content)
        
        print(f"\n{target}\n")
posted @ 2020-04-04 19:34  Nefarious  阅读(768)  评论(1)    收藏  举报