s = 'xxxxx'
s2 = s.encode()
print(s2)
print (s2.decode())
b’xxxxx’
xxxxx
encode具体参数参考:
https://docs.python.org/3/library/stdtypes.html?highlight=encode#string-methods
博客提供了Python中encode具体参数的参考链接,链接为https://docs.python.org/3/library/stdtypes.html?highlight=encode#string-methods ,有助于开发者了解相关参数信息。
s = 'xxxxx'
s2 = s.encode()
print(s2)
print (s2.decode())
b’xxxxx’
xxxxx
encode具体参数参考:
https://docs.python.org/3/library/stdtypes.html?highlight=encode#string-methods

被折叠的 条评论
为什么被折叠?