SyntaxFix
Write A Post
Hire A Developer
Questions
Here's a really simple way in python 3+:
f = open('filename.txt', 'w') print('something', file = f)
^ found that from this answer: https://stackoverflow.com/a/4110906/6794367