title: Name 'f' is not defined (Pycharm IDE)
body: <p>Pycharm keeps saying f is undefined even though it is.
  What am I doing wrong?</p>
  
  <pre><code>def Main():
  
      f = open("C:\Users\Donna\Desktop\myfile.txt","w")
  
  for i in range(4):
      f.write=(raw_input("Enter a word here")+'\n')
  if __name__ =="__main__":
   Main()
  </code></pre>