Re: [Tutor] Mysterious syntax errors and file-reading issues

2006-07-14 Thread Alan Gauld
> def exists('/Users/username/Documents/python/word_bank.txt'): >return os.access('/Users/usernameDocuments/python/word_bank.txt', > 1. I get a "syntax error" message at the line that starts with "def > exists", but I don't see the mistake. You are defining a function with a constant as an

[Tutor] Mysterious syntax errors and file-reading issues

2006-07-14 Thread Jeremiah Hill
I'm trying to write a program that will read a text file and return a random subset of the words contained therein.  (Its purpose is to generate lists of words for spelling bees.  I'm a teacher.)  Here's what I have so far: CODE STARTS ***L1 = []                # create