回答編集履歴
1
リスト出力も追加
answer
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
```Python
|
4
4
|
# utf-8に変換した結果(バイト列)をprint
|
5
5
|
def print_bytes(s):
|
6
|
+
print(list(s)) # ['マ', 'イ', 'ノ', 'リ', 'テ', 'ィ', '・', 'リ', 'ホ', '゚', 'ー', 'ト']
|
6
|
-
print(s.encode('utf-8'))
|
7
|
+
print(s.encode('utf-8')) # b'\xe3\x83~
|
7
8
|
|
8
9
|
# b'\xe3\x83\x9e\xe3\x82\xa4\xe3\x83\x8e\xe3\x83\xaa\xe3\x83\x86\xe3\x82\xa3\xe3\x83\xbb\xe3\x83\xaa\xe3\x83\x9d\xe3\x83\xbc\xe3\x83\x88'
|
9
10
|
# と出力される
|