Skip to content

Commit 856b698

Browse files
committed
fix: Use create_or_update_file instead of append_to_file
1 parent 9aa86dc commit 856b698

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

hands_on/list_commits.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from exercise_utils.file import append_to_file
3+
from exercise_utils.file import append_to_file, create_or_update_file
44
from exercise_utils.git import add, commit, init
55

66
__requires_git__ = True
@@ -13,9 +13,14 @@ def download(verbose: bool):
1313

1414
init(verbose)
1515

16-
append_to_file(
16+
create_or_update_file(
1717
"fruits.txt",
18-
"apples\nbananas\ncherries\ndragon fruits\n"
18+
"""
19+
apples
20+
bananas
21+
cherries
22+
dragon fruits
23+
"""
1924
)
2025

2126
add(["fruits.txt"], verbose)

0 commit comments

Comments
 (0)