riddle 1 (python)

saw this question: Check whether all characters of one string, are found in another. highlight the text below for my answer.

(python solution below – i cheated – i checked my syntax in an interpreter)

 
def fn(x,y): not False in [i in x for i in y]

[More programming riddles]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s