Python Programming - Standard Libraries
Exercise : Standard Libraries - General Questions
- Standard Libraries - General Questions
21.
Which module in Python is commonly used for handling compressed files, such as gzip and zlib formats?
Answer: Option
Explanation:
The
gzip
module in Python provides functionality for working with gzip-compressed files.
22.
What does the
shutil.rmtree()
function do?
Answer: Option
Explanation:
The
shutil.rmtree()
function in Python is used to remove a directory and its contents recursively.
23.
Which module in Python is used for working with the SQLite database?
Answer: Option
Explanation:
The
sqlite3
module in Python provides a simple way to work with SQLite databases.
24.
What is the purpose of the
queue
module?
Answer: Option
Explanation:
The
queue
module in Python provides classes for implementing various types of queues, including FIFO and priority queues.
25.
What does the
collections.Counter
class do?
Answer: Option
Explanation:
The
collections.Counter
class in Python is used to count the occurrences of elements in an iterable, such as a list or a string.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers