LoginSignup
2
0

More than 5 years have passed since last update.

PythonでASCIIパーセントエンコーディングする

Posted at
from urllib.parse import quote

quote('いろはにほへと')
#=> '%E3%81%84%E3%82%8D%E3%81%AF%E3%81%AB%E3%81%BB%E3%81%B8%E3%81%A8'

参考
ドキュメント urllib.parse — Parse URLs into components https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote
How to percent-encode URL parameters in Python? https://stackoverflow.com/a/1695199/8776028

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0