def checkio(data):
returnValue = True
if (len(data) < 10) or (re.search("[A-Z]", data) == None) or (re.search("[a-z]", data) == None) or (re.search("[0-9]", data)) == None:
returnValue = False
return returnValue;
Visar inlägg med etikett Checkio. Visa alla inlägg
Visar inlägg med etikett Checkio. Visa alla inlägg
söndag 8 december 2013
Checkio: House Password
My solution for Checkio assignment House Password:
lördag 7 december 2013
Checkio: Non-unique elements
My solution for the second problem (called Non-unique elements) in checkio:
def checkio(data):
return [x for x in data if data.count(x) >= 2]
Checkio: Extra dashes
My solution for the first problem in Checkio (http://www.checkio.com)
def checkio(line):
return "-".join([x for x in line.split("-") if x != ""])
Prenumerera på:
Inlägg (Atom)