convert number in one base to another.
arguments:
- base_from (int)
number is represented in this base
- base_to (int)
output is to be represented in this base
- number (string)
input number represented in base base_from
- digits (int) (optional, default=None)
if specified, and output string is shorter than digits, fill with zeros until output string is digits long
result:
return string representation of number in base base_to
examples:
>>> import decida
>>> decida.baseconvert(16, 10, "1242")
'74562'
>>> import decida
>>> decida.baseconvert(10, 16, "113", 4)
'0071'
notes:
string.atoi(number, base) converts base 10 number to other base