[python] Convert base-2 binary number string to int