You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1623,13 +1623,13 @@
1623
1623
1624
1624
1625
1625
<div><h3id="encode-1">Encode</h3><pre><codeclass="python language-python hljs"><bytes> = bytes(<coll_of_ints>) <spanclass="hljs-comment"># Ints must be in range from 0 to 255.</span>
1626
-
<bytes> = bytes(<str>, <spanclass="hljs-string">'utf-8'</span>) <spanclass="hljs-comment"># Encodes string. Also <str>.encode('utf-8').</span>
1626
+
<bytes> = bytes(<str>, <spanclass="hljs-string">'utf-8'</span>) <spanclass="hljs-comment"># Encodes the string. Also <str>.encode().</span>
1627
1627
<bytes> = bytes.fromhex(<spanclass="hljs-string">'<hex>'</span>) <spanclass="hljs-comment"># Hex pairs can be separated by whitespaces.</span>
<div><h3id="decode-1">Decode</h3><pre><codeclass="python language-python hljs"><list> = list(<bytes>) <spanclass="hljs-comment"># Returns ints in range from 0 to 255.</span>
1632
-
<str> = str(<bytes>, <spanclass="hljs-string">'utf-8'</span>) <spanclass="hljs-comment"># Decodes bytes. Also <bytes>.decode('utf-8').</span>
1632
+
<str> = str(<bytes>, <spanclass="hljs-string">'utf-8'</span>) <spanclass="hljs-comment"># Returns a string. Also <bytes>.decode().</span>
0 commit comments