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 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
Alright lets write a Python function to achieve this task We are expected to use a lambda function t... View full answer
Get step-by-step solutions from verified subject matter experts
