code: def base_to_int(s, base):
      
      
      digit = {}
      for i,c in enumerate(string.digits + string.ascii_uppercase):
          digit[c] = i
      multiplier = 1
      res = 0
      for c in s[::-1]:
          res += digit[c] * multiplier
          multiplier *= base
      return res
docs: Note : You can use int() built-in function instread of this.
          :type s: str
          :type base: int
          :rtype: int