>>> t_s = (8063599, 0) >>> fields = [(t_s := divmod(t_s, b)) for b in (60, 60, 24, 7)] >>> list(reversed(fields + [t_s])) [13, 2, 7, 53, 19]
It works and shows how the assignment operator works.
The point here is to convert a timestamp into ISO week, day, hour, minute, second. 13th week, 2nd day, 7h, 53m, 19s.
The divmod() function returns a two-tuple, which the assignment operator can't decompose. Instead, we decompose it by wrapping the whole thing in ().
Do Not Recommend.