Q. Create a file phonebook.det that stores the details in following format:
Name Phone
Jiving 8666000
Kriti 1010101
:
Obtain the details from the user.
Answer =
f = open("phonebook.det ","w") f.write("Name \t") f.write("Phone \t") f.write("\n") while True : name = input("Enter name :-") phone = input("Enter Phone :-") f.write(name +"\t") f.write( phone + "\t") f.write("\n") user = input("Enter quit or continue (Q/C) :-") if user == "Q" or user == "q": break f.close() print("Thankyou")
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )