I need help to iterate through a data dictionary column called 'TimeO' and 'TimeC' in this function.
Data_Dict = {'TimeO': ['9:00:00', '10:00:00'] 'TimeC': ['14:00:00', '16:00:00']}
x should be values from TimeO and y should be values from TimeC.
I can't figure out how to iterate the values
def timed_duration():
opening = datetime.strptime(x, '%H:%M:%S')
closing = datetime.strptime(y, '%H:%M:%S')
sec =(closing-opening).total_seconds()
hour = sec/3600
return(hour)
timed_duration()
x and y should iterate through 400 records but I don't know what to do