python 2.7
how do you take any number and be able to compress it to just lowercase letters and numbers? and how do you take the resulting string and put it back to the number?
doing something like chr() for each block of numbers of 3 numbers won’t work because if the block of number is bigger than 255, it will throw an error, and I only want lowercase numbers and letters.
edit:
the main purpose of this it to compress a number. the user will be seeing this and will be typing it in, so it needs to be easily typeable (can’t have weird characters that ascii supports but isn’t on a standard keyboard)
Use base 36, below is an adapted version of the Python implementation that you can find on Wikipedia: