MCQ Single Best Answer Not Set

QWhat does the following statements do?
from datetime import *
print(getattr(datetime.today(),'year'))

ID: #3571 Python Module MCQ 213 views
Question Info
#3571Q ID
Not SetDifficulty
Python Module MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Displays current date and year
  • B Displays current year
  • C Displays the number of months in a year
  • D Displays the number of days in a year
Correct Answer: Option B

Explanation

Displays current year

Share This Question

Challenge a friend or share with your study group.