def b36(number):
 if ((not number) or (number < 0)):
  return B36_ALPHABET[0]
 base36 = []
 while number:
  (number, i) = divmod(number, 36)
  base36.append(B36_ALPHABET[i])
 return ''.join(reversed(base36))

def b36 ( number ) : if ( ( not number ) or ( number < 0 ) ) : return B36_ALPHABET [ 0 ] base36 = [ ] while number : ( number , i ) = divmod ( number , 36 ) base36 . append ( B36_ALPHABET [ i ] ) return '' . join ( reversed ( base36 ) )
convert a number to base36 .