I am trying to basically get the data from keywords.txt and put it into a list. Then, if the user entered data in the form is not in the list, it gets written to the file and it will take the user to a certain webpage depending on if it is in the list or not. I essentially want the file to be just full of words with one word on a line but first I am just trying to get it to work. 

I am having trouble understand what variable the user entered data is if that makes any sense.

```
#!/usr/bin/env python
import cgi
import cgitb
cgitb.enable()

form = cgi.FieldStorage()
keyword = form.getvalue('keyword')

print 'Content-type: text/html\r\n\r'
print '<html>'
print '<h1>Please enter a keyword of your choice</h1>'
print '<form action="results.cgi" method="post">'
print 'Keyword: <input type="text" name="keyword">  <br />'
print '<input type="submit" value="Submit" />'
print '</form>'
print '</html>'

keylist = []
f = open('keywords.txt', 'rw')
for each in f.readline():
    keylist.append(each)

if keyword in keylist:
    print 'Location: %s' % # my url

else:
    f.write(keyword)
    f.close()
    print 'Location: %s' % # my second url

```