Created
February 14, 2012 14:58
-
-
Save benzonico/1827390 to your computer and use it in GitHub Desktop.
FooBarQix OneLiner in python : Warmup coding for codestory in the train.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "\n".join(["".join((lambda x,d:(map(lambda t:{0:t[1]}.get(x%t[0],""),d.items()))+[d.get(int(c),"") for c in str(x)])(n,{3:"foo",5:"bar",7:"qix"})) or str(n) for n in xrange(1,100)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment