"2024-01-05 10:23:11 ERROR Payment failed for order 1004" — a date, a time, a severity level, then a free-text message. Write parse_log_line(line) that splits this into a dictionary with keys date, time, level, and message, using only str.split() (with a limited split count so the message itself can contain spaces).line = '2024-01-05 10:23:11 ERROR Payment failed for order 1004'
{'date': '2024-01-05', 'time': '10:23:11', 'level': 'ERROR', 'message': 'Payment failed for order 1004'}The first three space-separated tokens are date/time/level; everything after that is the message, kept intact.
`line.split(' ', 3)` splits into at most 4 pieces, so the message keeps its internal spaces.