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