write_file_with_python
Write file with python
Scrivere un semplice file di testo
with open("demofile.txt", "a") as f: f.write("Now the file has more content!")
Scrivere un json formattato
import json data = { "some": "content" } with open('data.json', 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=4)
write_file_with_python.txt · Last modified: by gabriele
