Python Programming - Standard Libraries

Exercise : Standard Libraries - General Questions
  • Standard Libraries - General Questions
41.
Which module in Python provides support for working with compressed files, such as ZIP and tar files, in a high-level manner?
zipfile
compression
archivelib
tarfile
Answer: Option
Explanation:
The zipfile module in Python provides high-level support for working with ZIP files.

42.
What does the random.shuffle() function do?
Sorts a list in random order
Picks a random element from a sequence
Generates a random integer
Returns a random floating-point number
Answer: Option
Explanation:
The random.shuffle() function in Python shuffles the elements of a list in a random order.

43.
Which module in Python is used for working with SQLite databases in an asynchronous manner?
sqlite
sqlite3
asyncsqlite
asqlite
Answer: Option
Explanation:
The asyncsqlite module in Python provides asynchronous support for working with SQLite databases.

44.
What is the purpose of the platform module?
Sorting elements in a list
Handling dates and times
Providing access to platform-specific APIs
Working with regular expressions
Answer: Option
Explanation:
The platform module in Python provides access to platform-specific APIs and information about the current operating system.

45.
What is the purpose of the pickle module?
Working with compressed files
Serialization of Python objects
Parsing JSON data
Handling dates and times
Answer: Option
Explanation:
The pickle module in Python is used for serializing and deserializing Python objects.