day 8エンコーディング2
1955 ワード
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#str --->byte encode
s = ' '
b = s.encode('utf-8')
print(b)
#byte --->str decode
s1 = b.decode('utf-8')
print(s1)
s = ' '
b = s.encode('utf-8')
print(b)
#byte --->str decode
s1 = b.decode('gbk')
print(s1)// ,