beginner's question

Hadi hadi at nojunk.com.au
Fri May 14 08:21:45 EDT 2004


Hi,
I have two files and the array that contains 20 words in it.
I'm trying to write python script that suppose achieve the following:
-Open file-1, read the line that contains 20 words separated with commas
-Compare each word with words in the array
-Open file-2
-if the word appears in the array write 'true' in file-2
-if not write 'false'
-repeat this for every line in the file-1

so, two file will be identical in terms of number of lines and number of
words in each line.
However, file-2 will only contain wods 'true' and 'false'.

Can anyone give some example or point me to som useful web sites please.

Thanks,
hadi





More information about the Python-list mailing list