Question: 5. Write a function to extract year, month and day from datetime using Lambda, and print using the string formatting. Sample input: now =

5. Write a function to extract year, month and day from datetime using Lambda, and print using the string 

5. Write a function to extract year, month and day from datetime using Lambda, and print using the string formatting. Sample input: now = 2020-09-10 22:24:17.072952 Output: 'Year: 2020, month: 9, day: 10 Example for string formatting: hello_statement = 'Hello, {}!" hello_statement.format("World')

Step by Step Solution

3.46 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Alright lets write a Python function to achieve this task We are expected to use a lambda function t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!