application_vnd.jupyter.stderr_output_1.png
example1_path = '../data/Example1.txt'

file1 = open(example1_path, 'r')

file1.name

file1.mode

file1.close()

file1.closed

with open(example1_path, 'r') as file1:
    file_contents = file1.read()

with open(example1_path, 'r') as file1:
    file_contents = file1.readlines()

with open(example1_path, 'r') as file1:
    file_contents = file1.readline()

with open(example1_path, 'r') as file1:
    for i, line in enumerate(file1):
        print(f'Line {i + 1} contains {line}')