This Python code gives exactly what I want:
a_hex_str = ':'.join('%02x' % b for b in a_bytes)
which is a string of the byte values in the byte array a_bytes printed in hex with a colon between each value.
I have been going mad trying to get the same output using the new format() function in place of the old % but all my attempts give errors.
I would be very grateful for assistance.