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'>
1013 Error in x, y, and format string must not be None
870 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1288 I'm a beginner at Flask. The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
1025 M2 Mac fails to install rbenv install 3.1.3 due to errors
859 Is there a way to get HttpServletRequest from the controller of spring mvc without adding a parameter to the method?
© 2025 OneMinuteCode. All rights reserved.