Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza Shulika committed Dec 25, 2024
1 parent ddb6d94 commit 514558c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
class CleanUpFile:
# write your code here
pass
def __init__(self, name: str) -> None:
self.name = name
self.file = None

def __enter__(self):
self.file = open(self.name)

def __exit__(self, exc_type, exc_val, exc_tb):
pass

def __del__(self):
self.file.close()

0 comments on commit 514558c

Please sign in to comment.