Prudential Interview Question

How to encode a binary address in python.