Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Number Base with use of "try : ... except ValueError : ..." solution in Clear category for Number Base by Dominik_Witczak
def checkio(str_number, radix):
try :
return int(str_number,radix)
except ValueError: # ValueError means wrong radix was given, return -1
return -1
Oct. 21, 2017