title: Python 3 doesn't have the file function
body: <p>In python 2.7 I was able to do:</p>
  
  <pre><code>file('text.txt', 'w').write('some text')
  </code></pre>
  
  <p>But in python 3 I have to use the open function, so I cannot write to a file on a single line anymore.</p>
  
  <pre><code>f = open('text.txt', 'w')
  print('some text', file = f)
  f.close()
  </code></pre>
  
  <p>Why did they remove the <code>file</code> function? </p>