Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to read files in python with

def file_reader(file):
    with open(file,'r') as infile:
        table = [row for row in infile]
    return table
print(file_reader('file.txt'))
Source by www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #read #files #python
ADD COMMENT
Topic
Name
9+4 =