def write_collection(self, filename, collection):
collection = sorted(list(collection))<EOL>with open(filename, '<STR_LIT>') as fd:<EOL><INDENT>fd.truncate()<EOL>fd.write('<STR_LIT:\n>'.join(collection).encode('<STR_LIT:utf-8>'))<EOL><DEDENT>
Writes a collection of stop words into a file.