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)





Click to Enlarge



arr = bytearray(b"Test")
print(arr)





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, May 03, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250