This will be really funny...
Given following python codes:
def getBinary(binaryInput, kSize, beginBit):
    if int(binaryInput[beginBit + kSize-1])==1:
        print 'entered!!!'
        shortE = binaryInput[beginBit:kSize+beginBit]
        print 'shortE is now: ', shortE
        print 'kSize is now: ', kSize
        return (shortE,kSize)
    else :
        print 'else entered...'
        kSize -=1
        getBinary(binaryInput, kSize, beginBit)
result = getBinary("{0:b}".format(6), 3, 0)
print result
The output is:
else entered...
entered!!!
shortE is now:  11
kSize is now:  2
None
I mean since shortE is 11 and kSize is 2, why the return value is None?
 
     
     
    