Which lines would you use?

Posted by: Pdfprep Category: PCAP-31-02 Tags: , ,

You are going to read 16 bytes from a binary file into a bytearray called data.

Which lines would you use? (Select two answers)
A . – data = bytearray (16)bf.readinto (data)
B . data = binfile.read (bytearray (16))
C . bf. readinto (data = bytearray (16))
D . data = bytearray (binfile.read (16))

Answer: CD

Explanation:

Reference: https://www.devdungeon.com/content/working-binary-data-python

Leave a Reply

Your email address will not be published.