bytes()
bytes([source[, encoding[, errors]]])b = bytes()
print(b) # Выведет b''b = bytes()
print(b) # Выведет b''b = bytes("Hello", "utf-8")
print(b) # Выведет b'Hello'b = bytes([65, 66, 67, 68, 69])
print(b) # Выведет b'ABCDE'original_bytes = b'ABCDE'
new_bytes = bytes(original_bytes)
print(new_bytes) # Выведет b'ABCDE'with open("data.bin", "rb") as file:
data = file.read()
print(type(data)) # Выведет <class 'bytes'>Последнее обновление