Here is something I found curious about python loops.
This loop run each character in a string
flag = True
for letter in letters:
if(letter in word):
flag = False
The loop below (at the bottom) runs each line of the file
fin = open('wordplay.txt');
user_input = raw_input('Enter some characters: ')
count = 0
for line in fin:
word = line.strip()
count += 1;
This is just too convenient. Basically my question is: Why is python not treating the contents of wordplay.txt as one long string and looping each character?
Any comment is greatly appreciate.