“Строка Python B.” Ответ

Строка Python B.

Python 3.x makes a clear distinction between the types:

str = '...' literals = a sequence of Unicode characters (Latin-1, UCS-2 or 
UCS-4, depending on the widest character in the string)
bytes = b'...' literals = a sequence of octets (integers between 0 and 255)
#If you're familiar with:

#Java or C#, think of str as String and bytes as byte[];
#SQL, think of str as NVARCHAR and bytes as BINARY or BLOB;
#Windows registry, think of str as REG_SZ and bytes as REG_BINARY.
Lucas Gomes

Python B перед строкой

# It means it's a byte string.
# Which means it'll just print b'string' if you try to print it out
string = b'Random string'
print(string)
string_without_b = string.decode()
print(string_without_b)
Random boi

Ответы похожие на “Строка Python B.”

Вопросы похожие на “Строка Python B.”

Больше похожих ответов на “Строка Python B.” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования