Week 6 ends - Python

This commit is contained in:
2026-06-08 19:54:16 +00:00
parent 59aed7c741
commit b0ed7431e8
1344 changed files with 233907 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import csv
#file = open("phonebook.csv", "a")
name = input("Name: ")
number = input("Numbers: ")
with open("phonebook.csv", "a") as file:
writer = csv.DictWriter(file, fieldnames=["name", "number"])
writer.writerow({"name": name, "number": number})
file.close()