0
explain it type conversion
#type conversion a = "1001" print(int(a,2)) print(int(a,10)) print(int(a))
1 Réponse
0
The second argument gives the base of the number that's shown in the string literal.
So int(a, 2) means that a is to be interpreted as a binary.