I\'m using Python 3.2.2.
I\'m looking for a function that converts a binary string, e.g. \'0b1010\' or \'1010\', into a binary literal, e.g. 0b1010 (not a string or
The string is a literal.
3>> bin(int('0b1010', 2)) '0b1010' 3>> bin(int('1010', 2)) '0b1010' 3>> 0b1010 10 3>> int('0b1010', 2) 10