# !/usr/bin/env python
# -*- encoding:utf-8 -*-
# __author__ = "Xeon"
# Email: Xeon@xeon.org.cn
""""""
# s1 = 'taibai'
# s2 = b'taibai'
# print(s1, type(s1))
# print(s2, type(s2))
#
# s3 = '太白金星'
# s4 = '太白金星'.encode('utf-8')
#
# print(s3, type(s3))
# print(s4, type(s4))

'''
str ---> bytes  编码用encode
'''
# s1 = 'alex'
# b1 = s1.encode('utf-8')
# b2 = s1.encode('gbk')
# print(s1, type(s1))
# print(b1, type(b1))
# print(b2, type(b2))

'''
str ---> bytes  编码用encode
'''
# s1 = '太白'
# b1 = s1.encode('utf-8')
# b2 = s1.encode('gbk')
# print(s1, b1)
# print(s1, b2)


'''
bytes ---> str  解码用decode
'''
# b1 = b'\xe5\xa4\xaa\xe7\x99\xbd'
# s1 = b1.decode('utf8')
# print(s1)
#
# b2 = b'\xcc\xab\xb0\xd7'
# s2 = b2.decode('gbk')
# print(b2)
