"""Any base to decimal
>>> CHECK THE SOURCE! <<<
Conversion of number from any base to decimal!
Answer by paw88789 on Nov 2, 2017 on Math StackExchange:
+------------------------------------------------------------------------+
A similar thing occurs if someone reads you, digit-by-digit,...
...left-to-right, a base ten numeral:
E.g. The actual numeral is 3702, but you only get one digit at a time:
[3] Current value is 3.
[7] Current the value is 3⋅10+7=37.
[0] Current the value is 37⋅10+0=370.
[2] Current the value is 370×10+2=3702.
End of number. The last current value is the actual value.
At each step, you multiply the previous total by the base...
...and add the next digit.
+------------------------------------------------------------------------+
"""