subject

([source[, encoding[, errors]]])
return a new array of bytes. the bytearray class is a mutable sequence of integers in the range 0 < = x < 256. it has most of the usual methods of mutable sequences, described in mutable sequence types, as well as most methods that the bytes type has, see bytes and bytearray operations.

the optional source parameter can be used to initialize the array in a few different ways:

if it is a string, you must also give the encoding (and optionally, errors) parameters; bytearray() then converts the string to bytes using str.
if it is an integer, the array will have that size and will be initialized with null bytes.
if it is an object conforming to the buffer interface, a read-only buffer of the object will be used to initialize the bytes array.
if it is an iterable, it must be an iterable of integers in the range 0 < = x < 256, which are used as the initial contents of the array.
without an argument, an array of size 0 is created.

see also binary sequence types β€” bytes, bytearray, memoryview and bytearray objects.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:50
A911 dispatcher is the sole sender of messages to all police officers. while on patrol, officers communicate with the dispatcher who, in turn, relays messages to other officers. the officers do not communicate directly with one another. this illustrates a network.
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 17:30
What is the main difference between cloud computing and saas? cloud computing is a platform, and saas is software. cloud computing is software, and saas is a platform. cloud computing is a service, and saas is software. cloud computing is a service, and saas is a platform.
Answers: 1
You know the right answer?
([source[, encoding[, errors]]])
return a new array of bytes. the bytearray class is a mutable...
Questions
Questions on the website: 13722363