Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Recursive golf solution in Creative category for Pearls in the Box by DiZ
checkio=P=lambda s,n:sum(s.count(m)*(m=='w'if n<2 else
P(~-s.count(m)*m+-~s.count(p)*p,n-1))for m,p in('wb','bw'))/len(s)
Feb. 13, 2015
Comments: