Re: [Tutor] help with loop that is to be fed out of a word list

2009-02-10 Thread Alan Gauld
"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

Re: [Tutor] help with loop that is to be fed out of a word list

2009-02-09 Thread John Fouhy
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: >

[Tutor] help with loop that is to be fed out of a word list

2009-02-09 Thread 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: if letter not in word: