SyntaxFix
Write A Post
Hire A Developer
Questions
Another good method to get an integer representation from binary is to use eval()
Like so:
def getInt(binNum = 0): return eval(eval('0b' + str(n)))
I guess this is a way to do it too. I hope this is a satisfactory answer :D