Prudential interview question

How to encode a binary address in python.