Friday , September 20 2024

If you want to fill a byte array with data read in from a stream, which method can you use?

Questions BankCategory: Python Essentials 2If you want to fill a byte array with data read in from a stream, which method can you use?
If you want to fill a byte array with data read in from a stream, which method can you use?

  • The readfrom() method
  • The readbytes() method
  • The readinto() method
  • The read() method

Explanation: The readinto(bytearray) reads the bytes from the file and fills the bytearray with them.

More Questions: Python Essentials 2 (PE2) Course Final Test