Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

ひらがな、カタカナの濁音/半濁音を清音にする

More than 1 year has passed since last update.

以下でできたのでメモ

import unicodedata

ba = 'ば'
unicodedata.normalize("NFKD", ba)[0]

pa = 'ぱ'
unicodedata.normalize("NFKD", pa)[0]

ha = 'は'
unicodedata.normalize("NFKD", ha)[0]

上記3つ、すべて で返ってくる
なお、Python2の場合はunicordにする必要がある

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away