Hi Everybody,
From MySQL query I get data which I put into a dictionary "d":
d = {0: (datetime.timedelta(0, 25200),), 1: (datetime.timedelta(0, 25500),), 2: (datetime.timedelta(0, 25800),), 3: (datetime.timedelta(0, 26100),), 4: (datetime.timedelta(0, 26400),), 5: (datetime.timedelta(0, 26700),)}
I have a list "m" with numbers like:
m = [3, 4, 1, 4, 7, 4]
I'd like to test "m" and if there is number "4", I'd like to receive another list "h" with hours from "d" where index from list "m" would be corresponding with keys from dictionary "d", so: m[1], m[3], m[5] would get me hours assigned to d[1], d[3], d[5] in list "h":
h = [7:05:00, 7:15:00, 7:25:00]
I'll appreciate your input for that...