Skip to content

Commit aa980a5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 707e325 commit aa980a5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

file_handling/read_file.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Relative path
22
def read_file():
3-
fp = open(r'test_file.txt', 'r')
4-
# read file
5-
text = (fp.read())
6-
# Closing the file after reading
7-
fp.close()
8-
"""
3+
fp = open(r"test_file.txt", "r")
4+
# read file
5+
text = fp.read()
6+
# Closing the file after reading
7+
fp.close()
8+
"""
99
>>> read_file()
1010
>>> print("Hello World!")
1111
"""
12-
return text
12+
return text
13+
1314

1415
if __name__ == __main__:
15-
from doctest import testmod
16-
testmod()
16+
from doctest import testmod
17+
18+
testmod()

0 commit comments

Comments
 (0)