my_string = b'The string'
They put b in front of the string like this, and I wonder what it means, what influence it has, and when it is used.
If you add b to the string in Python 3, it becomes a byte type. If you run it in REPL, it's as follows.
>>> a = b'abc' >>> type(a) <class 'bytes'> >>> b = 'abc' >>> type(b) <class 'str'>
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
582 PHP ssh2_scp_send fails to send files as intended
1022 In Java servlet, when SHA-256 sends WW-Authenticate header for digest authentication, the client does not return the result.
590 Scrap text information after the "View More" button when searching in the Yahoo! News search window
578 Understanding How to Configure Google API Key
© 2024 OneMinuteCode. All rights reserved.