readinto(b)
Read up to len(b) bytes into b, and return the number of bytes read. The object b should be a pre-allocated, writable array of bytes, either bytearray or memoryview.
I think answer A should be two separate lines:
data = bytearray (16) => 16 bytes bytearray named 'data'
bf.readinto (data) => read 16 bytes (the length of the byte array) into the bytearray named 'data'
D:
data = bytearray (binfile.read (16)) =>reading 16 bytes form the binary file and putting it in a bytearray called 'data'
A,D are the right answers
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Ram5678
2 years, 1 month agoJnanada
2 years, 3 months agostuartz
2 years, 5 months agomacxsz
2 years, 7 months agorocky48
2 years, 8 months agoTheNetworkStudent
2 years, 8 months agowts28
2 years, 9 months agosadako11
2 years, 9 months agodougie_fr3sh
2 years, 11 months agokarans
2 years, 10 months agoluckymuki
3 years, 1 month ago