0 = 0
1 = 1
...
9 = 9
10 = a
11 = b
...
35 = z
36 = A
37 = B
...
60 = Z
61 = 10
62 = 11
...
70 = 19
71 = 1a
72 = 1b
I don't know what this is called. Base something?
All I want is a function that can convert the numbers into these, and these back to numbers.
Is there an easy function that can do this?
The other direction is more complicated, but try this ActiveState recipe.
Normally base conversions make no distinction between cases. I'm not sure how to completely extend this to make that distinction, but the recipe should give you a start.
You may inherit numbers.Number:
Found another bug. Change it to a factory function. Now may handle general situation.