We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acea245 commit 7b43efdCopy full SHA for 7b43efd
file_handling.py
@@ -1,8 +1,9 @@
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.")
+f = open(file_name, 'w')
+f.write("1. Attend the meetup")
+f.write("2. Go home and get sleep")
+f.write("3. Make sure you had lunch before going to bed.")
7
+f.close()
8
9
print("File written successfully")
0 commit comments