title: Save a counter list to a file in python
body: <p>I have this and I want to save a counter list to a file:</p>
  
  <pre><code>def main():
      #Ask for the input filename
      nameInput = input("Enter the name of the input file: ")
  
      #Open the file name that was specified
      filename = open(nameInput, 'r')
  
      #Read the file that was specified
      textFile = filename.read()
  
      #Get the word count in the file
      wordCount = (textFile.split())
  
      #Print out the word count
      print("There are",len(wordCount),"words in this file.")
  
      #Import the Counter module
      from collections import Counter
  
      #Get the frequency of every word in the file
      freq = Counter(wordCount)
  
  main()
  </code></pre>
  
  <p>How can I save the "freq" string to a file?</p>