def convert_radix(source_number_str, source_radix, destination_radix):
number = int(source_number_str, source_radix)
result = ''
while source_number > 0:
result += str(number % destination_radix)
number //= destination_radix
return result[::-1]
x = convert_radix('A13', 16, 10)
print(x) # 2579