‘str‘ object has no attribute ‘decode‘

print (‘张三’.decode(‘utf-8’)) //错误

改为

print (‘张三’.encode(‘utf-8’).decode(‘utf-8’)) //正确

转载于:https://blog.csdn.net/qq_38890412/article/details/86591294

你可能感兴趣的:(深度学习,python,base64)