当前位置: 代码迷 >> 综合 >> python3 str.encode().py
  详细解决方案

python3 str.encode().py

热度:22   发布时间:2024-01-24 12:24:04.0
str1 = "abc"
b_str1 = str1.encode('utf-8')
print("str1:", str1)
# str1: abc
print("b_str1:", b_str1)
# b_str1: b'abc'
  相关解决方案