3 ms·
with open('text.txt','w').as_text() as f: f.write("text")
by BiteCode_dev 6y ago
with open('text.txt','w').as_text() as f:
f.write("text")
- VWWHFSfQ 6y agoit's just too weird and open-ended. the next thing will be a bunch of "open" functions: with open_binary("filename") as f: ... with open_text("filename") as f: ... How do I open these files in writeable mode? with open_text("filename").writeable() as f: ... This is getting absurd.