On this page
article
Datetime Exercise #8
Practice datetime — exercise 8 of 30.
Topic: Datetime
Difficulty: Beginner
Problem
Write a solution for Datetime Exercise #8:
Implement a function solve_datetime_8(data) that processes the input according to datetime concepts from the curriculum.
Example input: data = [datetime_example_8]
Expected: A transformed result demonstrating datetime skills.
Constraints
- Use idiomatic Python 3.10+
- Handle empty input gracefully
- Do not mutate input unless specified
Hint
Hint
Review Datetime exercises and the related chapter in the Learning Path. Consider edge cases: empty collections, None, zero, negative numbers.
Test Yourself
# Write tests before implementing
assert solve_datetime_8([]) is not None # define expected behavior
Next exercise: Datetime Exercise #9