Skip to content

Commit acea245

Browse files
committed
File handling with keyword
1 parent cca8b7f commit acea245

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

file_handling.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file_name = "my_tasks.txt"
2+
3+
with open(file_name, 'w') as f:
4+
f.write("1. Attend the meetup")
5+
f.write("2. Go home and get sleep")
6+
f.write("3. Make sure you had lunch before going to bed.")
7+
8+
print("File written successfully")

0 commit comments

Comments
 (0)