Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

# read and write a text file

# read Text from File
def read_file(filename):
    with open(filename, encoding='utf-8') as file:
        return file.readlines()
      
     
# write Text to File
def write_to_file(filename, text):
    with open(filename, 'w', encoding='utf-8') as file:
        file.write(text)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #write #text #file
ADD COMMENT
Topic
Name
9+9 =