Read the contents of the file :
# Reads the contents of the file and press newline slicing Lines = Open ( " Data / voc01.txt " , encoding = " UTF-. 8 " ) .read (). Split ( " \ n- " )
Write to the file:
# Additionally written to the specified file STR = " ABCD " with Open ( ' E: /test/test_en.txt ' , MODE = ' A + ' , encoding = " UTF-. 8 " ) W AS: w.write (STR + " \ the n- " )