Python: Bytes() Function - W3resource

Python: bytes() function Last update on August 19 2022 21:50:45 (UTC/GMT +8 hours)

bytes() function

The bytes() function is used to get a new 'bytes' object.

Note: bytes is an immutable version of bytearray – it has the same non-mutating methods and the same indexing and slicing behavior.

Accordingly, constructor arguments are interpreted as for bytearray()

Syntax:

bytes([source[, encoding[, errors]]]) Python: Built-in function - bytes function()

Version:

(Python 3.2.5)

Return value:

Return a new 'bytes' object, which is an immutable sequence of integers in the range 0

Từ khóa » B' X00 N'