The queue module in Python provides classes for implementing various types of queues, including FIFO and priority queues.
Discuss About this Question.
Which module in Python is used for working with the SQLite database?
A:
sqlite
B:
sql
C:
sqlite3
D:
db
Answer:C
The sqlite3 module in Python provides a simple way to work with SQLite databases.
Discuss About this Question.
What does the shutil.rmtree() function do?
A:
Removes a file
B:
Removes a directory and its contents recursively
C:
Renames a file
D:
Creates a new directory
Answer:B
The shutil.rmtree() function in Python is used to remove a directory and its contents recursively.
Discuss About this Question.
Which module in Python is commonly used for handling compressed files, such as gzip and zlib formats?
A:
compression
B:
compresslib
C:
zlib
D:
gzip
Answer:D
The gzip module in Python provides functionality for working with gzip-compressed files.
Discuss About this Question.
What is the purpose of the subprocess module?
A:
Working with regular expressions
B:
Handling dates and times
C:
Interacting with shell commands and external processes
D:
Sorting elements in a list
Answer:C
The subprocess module in Python is used for interacting with shell commands and external processes, providing a way to spawn new processes and connect to their input/output/error pipes.
Discuss About this Question.
Ad Slot (Above Pagination)
Install ExamAdept
Fast access — add this app to your device.
To install on iPhone/iPad: tap Share → Add to Home Screen.
Discuss About this Question.