Which of the following best describes the types of data that can be serialized…

2026

Which of the following best describes the types of data that can be serialized and stored in a binary file using Python’s pickle module?

  1. A.

    Only string data

  2. B.

    Only numeric data

  3. C.

    Only collection data types

  4. D.

    Any common Python object

Attempted by 535 students.

Show answer & explanation

Correct answer: D

The correct answer is Any common Python object.

The pickle module in Python is used for serialization, which means converting Python objects into a byte stream so they can be stored in a binary file. It supports a wide range of data types including strings, numbers, lists, dictionaries, tuples, and even custom objects like classes and functions. Therefore, it is not limited to a specific type of data.

Thus, the correct answer is: Any common Python object

Explore the full course: Rssb Senior Computer Instructor