Python Programming - Standard Libraries
Exercise : Standard Libraries - General Questions
- Standard Libraries - General Questions
6.
In Python, which module is commonly used for handling dates and times?
Answer: Option
Explanation:
The
datetime
module in Python is used for working with dates and times, providing classes and functions to manipulate and format date and time values.
7.
Which function from the
os
module is used to change the current working directory?
Answer: Option
Explanation:
The
os.chdir()
function is used to change the current working directory in Python.
8.
Which module is used for sending emails?
Answer: Option
Explanation:
The
smtplib
module in Python is commonly used for sending emails using the Simple Mail Transfer Protocol (SMTP).
9.
Which method is used to remove an element from a set?
Answer: Option
Explanation:
The
discard()
method is used to remove a specified element from a set, if the element is present.
10.
Which module in Python provides functionality to work with compressed files, such as ZIP files?
Answer: Option
Explanation:
The
zipfile
module in Python provides tools for creating, reading, and extracting ZIP files.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers