Articles → PYTHON → Bytearray In Python
Bytearray In Python
What Is Bytearray?
 
Syntax
 
bytearray(size)
Or 
bytearray(b’string’)
Example
 
size = 5
arr = bytearray(size)
print(arr)
Output
 
The Second Example
 
arr = bytearray(b"Test")
print(arr)
Output
 
| Posted By  - | Karan Gupta | 
|  | 
| Posted On  - | Friday, May 3, 2019 |