input: Write a python function to convert a number from one base to another.
  assert convert_base('610', 7, 10) == '303'
  assert convert_base('303', 10, 7) == '610'
  assert convert_base('1A', 16, 10) == '26'
  assert convert_base('26', 10, 16) == '1A'
output: def convert_base(number: str, from_base: int, to_base: int) -> str:
      # Convert the number from the source base to base 10
      base10_number = int(number, from_base)
      # Convert the base 10 number to the target base
      if to_base == 10:
          return str(base10_number)
      else:
          digits = "0123456789ABCDEF"
          result = ""
          while base10_number > 0:
              result = digits[base10_number % to_base] + result
              base10_number //= to_base
          return result