"David" wrote
def uses_all(word, required):
for letter in required:
if letter not in word:
return False
return True
Now, I want to feed this code a list of words. This is what I have
so far:
def uses_all(required):
It is usually better to leave things that work a
2009/2/10 David :
> Dear list,
>
> out of "Thinking in Python" I take the following code, which
> "takes a word and a string of required letters, and that returns True if
> the word uses all the required letters at least once".
>
>
> def uses_all(word, required):
>for letter in required:
>
Dear list,
out of "Thinking in Python" I take the following code, which
"takes a word and a string of required letters, and that returns True if
the word uses all the required letters at least once".
def uses_all(word, required):
for letter in required:
if letter not in word: