For this assignment, you are tasked with writing a Python function that will open the file.txt file and return the number of lines.
- The function must return the number of lines in the
file.txtfile - The function must be implemented in a separate Python file called
word_count.py - The function must be named
line_countand accept no arguments - The function must return an integer
Given the following file.txt:
Hello, world!
This is a test file.
The function should return 2.