A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_func_bytearray.asp below:

Website Navigation


Python bytearray() Function

Python bytearray() Function

❮ Built-in Functions

Definition and Usage

The bytearray() function returns a bytearray object.

It can convert objects into bytearray objects, or create empty bytearray object of the specified size.

Syntax

bytearray(x, encoding, error)

Parameter Values Parameter Description x A source to use when creating the bytearray object.

If it is an integer, an empty bytearray object of the specified size will be created.

If it is a String, make sure you specify the encoding of the source.

encoding The encoding of the string error Specifies what to do if the encoding fails. Related Pages

The bytes() Function

❮ Built-in Functions

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4