あるフリーランスエンジニアの色んなメモ!! ITスキル・ライフハックとか

Python:Python2系でstrをunicode型として扱う

from __future__ import unicode_literals

をimportに追加する

これで、「u’文字列’」を使用しなくてもunicode型としてstrが扱われる

comments powered by Disqus