David wrote:
I have to ask for a pointer, not sure what I am doing wrong.
The first thing you are doing "wrong" is failing to tell us what is in
the wordlist file and what results you get when you run the program.
Please re-post with that information.
#!/usr/bin/python
password = 'loser'
wordlist = '/home/david/Challenge-You/wordlist.txt'
try:
words = open(wordlist, 'r').readlines()
except IOError, e:
print "Sorry no words"
for word in words:
word = word.replace("\n","")
if password in word:
print word
else:
print 'You are a loser'
--
Bob Gailer
Chapel Hill NC
919-636-4239
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor