Solutions will be available when this assignment is resolved, or after a few failing attempts.

First nth line from file

Write a function, that receives a path to a text file and a line number as parameter, and returns the N-th line of that file.


read_line_number('test-file.txt', 2)  # "this is the line number 2"

Test Cases


def read_line_number(filepath, line_number): pass