Pythonのお勉強 Part71at TECH
Pythonのお勉強 Part71 - 暇つぶし2ch228:デフォルトの名無しさん (ワッチョイ 9b90-AvD6)
23/10/02 18:44:51.23 FS0/fzQ10.net
>>220
こんな感じ?

import binascii
name = '鈴木'
bin = name.encode('utf-8') # utf-8のエンコード
binstr = bin.hex() # binの文字列化
bin2 = binascii.unhexlify(binstr) # bytesに
name2 = bin2.decode('utf-8')
print(name2)


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch