open('text.txt', 'w').write('some text')
works the same way and open has been the canonical way to open a file (and hence create a file instance) for a long time, even on Python 2.x.
It should be noted, though, that in Python 3.8+ this now generates a ResourceWarning about an unclosed file. This is because, although the file will typically be closed automatically after the write call, depending on garbage-collection settings this will not necessarily happen immediately, so the open file handle may persist. The proper way to ensure file closure and avoid the warning (and annoyingly, this makes the code no longer inline-able) is:
with open('text.txt', 'w') as fileHandle:
fileHandle.write('some text')