When writing some didactic examples in Python 2.7, I came across the following situation in the following program:
a = 0b101
b = 0b111
c = a+b
print c
The result of this program is 12 (decimal). If I want a binary value to be displayed in the sum result, I have to convert the obtained value to binary, and then the program looks like this:
a = 0b101
b = 0b111
c = bin(a+b)
print c
Now, knowing that Python is strongly typed (does not accept automatic type conversion), how, by determining binary values in variables a and b, and summing their values, does it give me a value of the sum as a decimal value? / p>