Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Number Base by Poetakodu
def checkio(str_number, radix):
abc = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for x in str_number:
if x not in abc[:radix]:
return -1
return int(str_number,radix)
Nov. 4, 2016