Could you explain what's unclear about it? Andreas couldn't get more
specific, since you didn't say how these 10 names are provided.
Yes, it was probably my fault. Sorry about that. I have come up with a new
way of working around
a problem in my main program so I only need two files to be tested if they
exist instead of say 10 files.
So, the program should check if two text files exist. If neither of them
exist, and only if neither of them,
then the program should print say "hi".
If only one of them exist, the program should continue to run without
crashing.
I hope this was more easy to understand!
I thought I could co along those lines earlier
try:
text_file=open("Hey","r") and text_file1=open("Hey","r")
Unfortunately this isn't valid Python syntax. The equal sign has a
specific statement syntax, and the only time you can have more than one of
them in one statement, is the chained assignments, where they all get bound
to the same object. You wouldn't want to do this anyway, since it would
leave all those open files in an unspecified state.
Thanks for the information. I figured that it was a little strange what I
wrote.
Mic
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor