how to read files in python with example
Example: 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'))
def file_reader(file):
with open(file,'r') as infile:
table = [row for row in infile]
return table
print(file_reader('file.txt'))