import pickle#序列化dic={'name':'afs'}print(type(dic))#<class 'dict'>j=pickle.dumps(dic)#pickle处理成字节print(type(j))#<class 'bytes'>字节