How to convert binary string to decimal in Python