Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clean and simple. solution in Clear category for Number Base by Celshade
def checkio(str_number: str, radix: int) -> int:
"""Return the string to decimal form, using the given radix."""
try:
return int(str_number, radix)
except ValueError:
return -1
June 13, 2018