Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Functional festival solution in Creative category for House Password by veky
from functools import partial
compose = lambda f, g: lambda *args, **kwargs: f(g(*args, **kwargs))
count = compose(sum, map)
@partial(compose, all)
def validate(text, **conditions):
for kind, minimum in conditions.items():
predicate = getattr(str, 'is' + kind)
yield count(predicate, text) >= minimum
checkio = partial(validate, upper=1, lower=1, digit=1, printable=10)
Nov. 11, 2015
Comments: