[py] binary string to integer