Ask Question

What is returned by datetime (1970, 1, 1). strftime ('%Y-%d-%B') in Python?

+3
Answers (1)
  1. 1 November, 19:32
    0
    1970-01-January

    Explanation:

    Given

    datetime (1970, 1, 1). strftime ('%Y-%d-%B')

    We start by analysing the give code segment.

    date time means that we want to work with dates and time

    1970,1,1 is the date time we're working with

    strftime represents the format we want the time to be

    ('%Y-%d-%B) = Year - Day - Month as full name

    Analysing the date itself, we have

    (1970, 1, 1) = ('%Y-%d-%B')

    By comparison

    %Y = Year = 1970

    %d = Day = 01

    %B = Full name of the month

    If month = 1, then we understand that the month is January ...

    So,

    %B = January

    Bringing the results together;

    (1970, 1, 1) = ('%Y-%d-%B') = "1970-01-January"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is returned by datetime (1970, 1, 1). strftime ('%Y-%d-%B') in Python? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers