aboutsummaryrefslogtreecommitdiff
path: root/challenge-072/lubos-kolouch/python/ch-2.py
blob: 5525686a224186f5f2833b8f4caae4e94ba54e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def display_lines(file_name: str, a: int, b: int) -> None:
    with open(file_name, "r") as file:
        lines = file.readlines()
        for line in lines[a - 1 : b]:
            print(line.strip())


# Suppose 'input.txt' is a file in the same directory with content as described in the problem
display_lines("input.txt", 4, 12)