>>> int("a", 36)
10
>>> int("z", 36)
35
>>> int("10", 36)
36
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.