python3环境下,中文转URL编码

#python3环境下,中文转URL编码
from urllib import parse
print(parse.quote(‘台湾’))

输出结果:%E5%8F%B0%E6%B9%BE

猜你喜欢

转载自blog.csdn.net/qq_26576921/article/details/88952574