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