I have the following python code, which converts a binary string into plain-text:
import bin ascii
n = int('01100001011000100110001101100100', 2)
binascii.unhexlify('%x' % n)
This code functions properly, but I don't understand what's going on here.
- What is the purpose of the "2" at the end of the int declaration?
- What is the purpose of the "'%x' % n" argument?