sciris.sc_fileio.savetext

savetext(filename=None, string=None)[source]

Convenience function for saving a text file – accepts a string or list of strings.

Example:

text = ['Here', 'is', 'a', 'poem']
sc.savetext('my-document.txt', text)