The built-in function int() can be used to convert a binary string to a base-10 digit. This function has a parameter "base." You need to set it to 2 to tell the function that the string you have provided is binary.
Here are some examples:
>>> int('10',base=2)2>>> int('1011',base=2)11>>> int('11',base=2)3>>> int('1010',base=2)10
>>> int('10',base=2)
2
>>> int('1011',base=2)
11
>>> int('11',base=2)
3
>>> int('1010',base=2)
10