Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
try-except solution in Clear category for Number Base by PawlakBartosz43
def checkio(str_number, radix):
try:
check = int(str_number, radix) #check if the conversion is possible
except:
return -1
return int(str_number, radix)
Oct. 31, 2016