Skip to content

Instantly share code, notes, and snippets.

@benzonico
Created February 14, 2012 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benzonico/1827390 to your computer and use it in GitHub Desktop.
Save benzonico/1827390 to your computer and use it in GitHub Desktop.
FooBarQix OneLiner in python : Warmup coding for codestory in the train.
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