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 00:00
Which requirement is an appropriate reason for a business to use it tools
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
question
Computers and Technology, 23.06.2019 22:40
22. sata3 allows for data transfer rates of 600 mb/s. explain why you would likely not be able to copy data from one hard drive to another at anywhere close to this speed. also, what could be upgraded on the computer to achieve transfer speeds closer to 600 mb/s
Answers: 1
You know the right answer?
([source[, encoding[, errors]]])
return a new array of bytes. the bytearray class is a mutable...
Questions
question
World Languages, 01.02.2020 10:42
question
Mathematics, 01.02.2020 10:42
question
Mathematics, 01.02.2020 10:42
question
Chemistry, 01.02.2020 10:42
question
English, 01.02.2020 10:42
question
Mathematics, 01.02.2020 10:42