==== Convert binary to decimal in Python ====== a = '11001100' # input a binary b = int(a,2) # base 2 to base 10 print(b,type(b)) # 204 <class 'int'>