擅长:python、mysql、java
<p>它正在返回一个bytes对象。通常base64用于确保7位安全,因此通常与面向字节(而不是面向字符)的数据一起使用,例如,将套接字挤出。你知道吗</p>
<p>您可以将其解码为字符串,就像任何其他字节对象一样:</p>
<pre><code>output.decode('ascii')
</code></pre>
<p>字节和字符串对象使用<code>encode()</code>和<code>decode()</code>在彼此之间更改。使用<code>ascii</code>编解码器是安全的,因为base64保证只返回7位ascii。你知道吗</p>