0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Python】unicodedataモジュールのnormalize()関数

Posted at

unicodedataモジュールのnormalize()関数は、次のコードのように文字列の正規化で使えます。

>>> import unicodedata
>>> unicodedata.normalize('NFKC', 'アアAA')
'アアAA' # 結果

「NFKC」で正規化の条件を指定しており、ここでは「半角カナを全角カナに変換し、全角英数字を半角英数字に変換」しています。

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?