`late_clock` function receive an array with 4 digits and should return the latest time that can be built with those digits.
The time should be in `HH:MM` format.
Examples:
```
[1, 9, 8, 3] => 19:38
[9, 1, 2, 5] => 21:59
```
You can suppose the input is correct and you can build from it a correct 24-hour time.
from itertools import *
from datetime import *

def late_clock(digits):
    dt = []
    for a,b,c,d in permutations(digits,4):
        try:
            dt.append(datetime.strptime(f'{a}{b}:{c}{d}', '%H:%M'))
        except:
            pass
    return max(dt).strftime('%H:%M')
from itertools import *
from datetime import *

def late_clock(digits):
    dt = []
    for a,b,c,d in permutations(digits,4):
        try:
            dt.append(datetime.strptime(f'{a}{b}:{c}{d}', '%H:%M'))
        except:
            pass
    return max(dt).strftime('%H:%M')