print(r'\t123','\t123') # \t 是否生效
# \t123 123
print(u'中文',"中文") # 字符串编码方式 unicode(默认编码方式)
# 中文 中文
a,b = 123,456
print(f'{a}{b}') # 替代format 方便书写
# 123456
print(b'123','123')
print(type(b'123'),type('123')) # bytes字节类型(网络传输) str字符串类型(内部使用)
# b'123' 123
# <class 'bytes'> <class 'str'>
print('中文'.encode('utf-8')) # utf-8编码 得到 bytes对象
print(b'\xe4\xb8\xad\xe6\x96\x87'.decode('utf-8')) # utf-8解码 得到str字符串类型
# b'\xe4\xb8\xad\xe6\x96\x87'
# 中文