Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
7-liner: Number Base solution in Creative category for Number Base by przemyslaw.daniel
digits = "0123456789abcdefghijklmnopqrstuvwxyz"
def checkio(number, base): #No try-except example
if set(number.lower())-set(digits[:base]):
return -1
return int(number, base)
Nov. 14, 2016
Comments: