What is the output of the following Python code snippet?
from datetime import date
print(date(2024, 3, 5).strftime('%m/%d/%y'))
print(date(2024, 3, 5).strftime('%m/%d/%y'))
Correct answer
A. 03/05/24
6 views
A. 03/05/24
6 views
%m/%d/%y formats as month/day/two-digit year.
Asked in: Python Interview Standard Library
https://docs.python.org/3/library/index.htmlNot sure why the answer is A? Ask here and get an explanation.