I raise you python 3.6+ using str.format() for best readability.
':'.join('{:2X}'.format(b) for b in s)On Tue, Feb 12, 2019 at 4:18 PM Alexander Nigl <[email protected]> wrote: > I take your > > > Python 3: > > ':'.join('%02x' % b for b in s) > > and raise you >=Python 3.6 > > ':'.join(f'{b:02X}' for b in s) > > Sry, had to do it ;) > > Alexander > > Ps: 02x is lowercase, 02X uppercase > _______________________________________________ > Cryptography-dev mailing list > [email protected] > https://mail.python.org/mailman/listinfo/cryptography-dev >
_______________________________________________ Cryptography-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/cryptography-dev
