title: Write to a file from a list with integer Python
body: <p>Im trying to write a text file from a list, it works perfectly with a list of strings, each element gets on a new line. But when I try to write from a list with integers it does not work. 
  The thing is I need that list as an integer-list in another place in the code (when comparing values in an if-statement), and I've tried to convert the integer-list to a string-list, but then the numbers gets placed on separate lines like for e.g., </p>
  
  <p>I have to write 2016 in one line:</p>
  
  <pre><code>2016
  </code></pre>
  
  <p>but, it gets like this</p>
  
  <pre><code>2
  0
  1
  6
  </code></pre>
  
  <p>here is the code for writing to a text file:</p>
  
  <p>print("write year: ")
  year.append(int(input()))</p>
  
  <p>...some code that needs the list year as an integer...</p>
  
  <p>year_string = str(year)</p>
  
  <pre><code>with open('movietitle.txt', 'w') as file:
      file.write('\n'.join(movietitle))
  
  with open('year_string.txt', 'w') as file:
      file.write('\n'.join(year_string))
  
  with open('genre.txt', 'w') as file:
      file.write('\n'.join(genre))
  
  with open('review.txt', 'w') as file:
      file.write('\n'.join(review))
  </code></pre>