The literal values expressed in python as
'b"8.23"' and 'b"1.25"'
These are expressions specific to python.
The literal values expressed in python as
'b"8.23"' and 'b"1.25"'
These are expressions specific to python.
The b
character before a string produces a variable of byte
type instead of string
type. You may read about this definition on the official website.
The character 'b' shows that the given variable is of type byte, not string.
Let me distinguish between string and byte definitions to make it clear,
str = '...'
# Above literals is sequence of Unicode characters (Latin-1, UCS-2 or UCS-4)
bytes = b'...'
# Above literals are sequence of octets (integers between 0 and 255)
)