## How to convert an hex number to binary in Python?

Problem We would like to convert an hexadecimal number to a binary number system (or from base 16 to base 2). Let’s assume that we have the following hexadecimal (which represent the integer value 512) Running a simple conversion using the bin() function renders a TypeError exception: TypeError: ‘str’ object cannot be interpreted as an … Read more