Skip to content

Commit 7c797d2

Browse files
committed
Level 04: Quine: pathlib
1 parent 1168646 commit 7c797d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Level_04/quine.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22

3-
we = open(__file__, "r")
4-
print(we.read())
5-
we.close()
3+
from pathlib import Path
4+
5+
we = Path(__file__)
6+
print(we.read_text())

0 commit comments

Comments
 (0)