Error splitting time in time calculator

timing = [“3:00 PM”, “3:10”, “Monday”]

for i, timer in enumerate(timing):
if “:” in timing[i]:
hr1, term = timing[i].split(“:”)
min1, ender = term.split(" ")
print(hr1)
print(min1)
print(ender)
elif “:” not in timing[i]:
day = timing[i]
print(day)

Error

3
00
PM
Traceback (most recent call last):
File “main.py”, line 9, in
min1, ender = term.split(" ")
ValueError: not enough values to unpack (expected 2, got 1)

When you’re enumerating over “3:10”, you’ll first split on : after which you’ll have term to be equal “10” and on the next line you’ll try to split it on an empty space and assign the result, but because there is no empty space in “10” you only get one element which will be assigned to min1 and nothing to assign to ender which results in an error.