Apparently, the following is valid syntax
my_string = b'The string'
I would like to know:
What does this ‘b’ character in front of the string mean?
What are the effects of using it?
What are appropriate situations to use it?
I found a related question right here on SO, but that question is about PHP though, and it states the ‘b’ is used to indicate the string is binary, as opposed to Unicode, which was needed for the code to be compatible from a version of PHP < 6, when migrating to PHP 6. I don't think this applies to Python.
I did find this documentation on the Python site about using a u character in the same syntax to specify a string as Unicode. Unfortunately, it doesn't mention the ‘b’ character anywhere in that document.
Also, just out of curiosity, are there more symbols than the ‘b’ and ‘u’ that do other things?