Bytearray
- 1 The del operator of bytearray class in Python In Python, the del operator removes one or more elements from a bytearray as specified through a single index or a start index and end index. A bytearray is a mutable sequence of bytes. 7 Jan 2026
- 2 The endswith() method of bytearray class in Python The endswith() method of Python bytearray class returns a Boolean value based on the presence of a suffix. The search can be specified of a start index and an end index. 17 Dec 2025
- 3 The find() method of bytearray class in Python The find() method of bytearray class in Python finds the position of a specified subsequence from the whole bytearray or between specified positions. 13 Nov 2025
- 4 The fromhex() method of bytearray class in Python The fromHex() method of the bytearray class in Python creates a bytearray using an even number hexadecimal digits. The input parameter can be a string, a bytes literal or any bytes-like object. 10 Nov 2025
- 5 The index() method of bytearray class in Python The index() method returns the position of a subsequence in a given bytearray. It differs from the find() method that when the subsequence is not found it raises a ValueError. 17 Dec 2025
- 6 The bytearray class in Python In Python, a bytearray is a mutable sequence of byte values that supports removal and replacement of an element or a slice. Once created a bytearray can be extended afterwards. 7 Jan 2026
- 7 The lower() method of bytearray class in Python The lower() method of the bytearray class in Python translates the byte values of uppercase ASCII characters into lowercase ASCII values and returns the new object. 12 Nov 2025
- 8 The partition() method of bytearray class in Python The partition method of bytearray class in Python splits the bytearray into three parts. The left part of the byte array, separator and the right part of the byte array. All the parts are returned as the elements of a tuple. 14 Nov 2025
- 9 The pop() method of bytearray in Python The pop() method removes an element from the bytearray. When the index is not specified the last element is removed. When the index is specified, it removes the element from the given index. 8 Jan 2026
- 10 The remove() method of bytearray class in Python In Python, given the integer value in the range of 0 to 255, the remove() method removes the corresponding element from a given bytearray. 8 Jan 2026
- 11 The removeprefix() method of bytearray class in Python The removeprefix() method from the bytearray class in Python removes a given prefix which is any bytes-like object and returns a new bytearray. 14 Nov 2025
- 12 The removesuffix() method of bytearray class in Python The removesuffix() method of bytearray class in Python removes a specified suffix and returns a new bytearray object. The suffix parameter is a bytes-like object. 15 Nov 2025
- 13 The replace() method of bytearray class The replace() method of bytearray class in Python replaces the occurrences of an old subsequence with the new sub sequences and returns the updated copy of the bytearray. 13 Nov 2025
- 14 The resize() method of bytearray class in Python The resize() method of bytearray class in Python increases or decreases the size of a bytearray object by a specified number of bytes. Newly added bytes have the hexadecimal value of "x00"". 11 Nov 2025
- 15 The translate() method of bytearray class in Python The translate() method of bytearray class in Python translates a given bytearray as per the mapping defined a translation table. A set of byte values can also be specified which can be deleted from a bytearray object. 13 Nov 2025
- 16 The upper() method of bytearray class in Python The upper() method of bytearray class in Python returns a bytearray object of uppercase letters from a bytearray of lowercase ASCII characters. 11 Nov 2025
- 17 The zfill() method of bytearray class in Python The zfill() method returns a bytearray of a specified length by prefixing the copy of the bytearray with zeroes. If the specified length is less than the original size than a copy of the bytearray is returned without any zero-prefixing. 11 Nov 2025