trying to write to python .txt file : <p>I am a new programmer, so be easy on me, I have watched a video on youtube, and understand most of it ( or so I thought).  </p>

<p>I get an error when I try to run </p>

<pre><code>import logging
import csv

Date = input ('what date was it?')  
fish = input ('what type of fish did you catch?')  
fly = input ('what fly did you catch the fish on?')  
water = input ('what was the water conditions?') 

fileName = 'fish.txt'
WRITE = 'w'  # write rebuilds the file, so nothing is in the file!
READ ='r'
APPEND = 'a'
ReadWrite = 'w+'

file = open('fileName', 'a') 
file.write (Date + "\n")  
file.write (fish + "\n") 
file.write (fly + "\n") 
file.write (water + "\n")  

allFileContents = fileName.read()
print (allFileContents)

file.close()
</code></pre>

<p>does anything jump out at you that might be wrong?  </p>
