Having trouble parsing a txt file into a list full of zip codes in my zipcode lookup program
<p>Hello everyone thanks for looking into my problem.  What I am trying to do is write a "Structured" program in python that takes txt from a file and parses it into lists.  Then after closing the file, I need to reference the user input (zipcode) in those lists and then print out the city and state according to the zipcode that they entered.  My instructor is having us use structure by making several functions.  I know there are probably lots of more efficient ways of doing this, but I must keep the structure thats in place.
<strong>EDIT</strong>
Here is my code(Current):</p>

<pre><code>#-----------------------------------------------------------------------
# VARIABLE DEFINITIONS

eof = False
zipRecord = ""
zipFile = ""
zipCode = []
city = []
state = []
parsedList = []

#-----------------------------------------------------------------------
# CONSTANT DEFINITIONS

USERPROMPT = "\nEnter a zip code to find (Press Enter key alone to stop): "

#-----------------------------------------------------------------------
# FUNCTION DEFINITIONS

def startUp():
    global zipFile
    print "zipcode lookup program".upper()
    zipFile = open("zipcodes.txt","r")
    loadList()

def loadList():
    while readRecord():
        pass
    processRecords()


def readRecord():
    global eof, zipList, zipCode, city, state, parsedList
    zipRecord = zipFile.readline()
    if zipRecord == "":
        eof = True
    else:
        parsedList = zipRecord.split(",")
        zipCode.append(parsedList[0])
        city.append(parsedList[1])
        state.append(parsedList[2])
        eof = False
    return not eof

def processRecords():
        userInput = raw_input(USERPROMPT)
        if userInput:
            print userInput
            print zipCode
            if userInput in zipCode:
                index_ = zipcode.index(userInput) 
                print "The city is %s and the state is %s " % \
                      (city[index_], state[index_])
            else:
                print "\nThe zip code does not exist."
        else:
            print "Please enter a data"

def closeUp():
    zipFile.close()

#-----------------------------------------------------------------------
# PROGRAM'S MAIN LOGIC

startUp()
closeUp()

raw_input("\nRun complete. Press the Enter key to exit.")
</code></pre>

<p>Here is a sample from the zipcode txt file:</p>

<pre><code>00501,HOLTSVILLE,NY
</code></pre>

<p>I am definitely stuck at this point and would appreciate your help in this matter.<br>
<strong>EDIT</strong></p>

<p>Thanks for all the help everyone.  I really do appreciate it. :)</p>
