'Convert base 36 value to base 10 value [duplicate]

How can I convert a base 36 value to base 10?

Base 36 value: lgzl0

We need to convert this value to 36064548.

Are there any built-in functions to convert base values?



Solution 1:[1]

I think your base is 36 and not 26 (numbers from 0 to 9 and letters from a to z) as there is a 'z' and a '0' (zero) in the number you want to convert. You can use the int function:

>>> int("lgzl0", base=36)
36064548

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 leleogere