File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
@Author: shubham shirke
3
3
@Date: 2023-06-12 10:30:30
4
4
@Last Modified by: shubham shirke
5
- @Last Modified time: 2022-06-12 4 :30:30
6
- @Title : To update existing contact in address book.
5
+ @Last Modified time: 2022-06-12 17 :30:30
6
+ @Title : To delete contact in address book.
7
7
'''
8
8
from AddressBook_Service import *
9
9
@@ -15,8 +15,9 @@ def main():
15
15
print ("-----------------------" )
16
16
print ("1.Add contact" )
17
17
print ("2.Update Contact" )
18
- print ("3.Print Contact" )
19
- print ("4.Exit" )
18
+ print ("3.Remove contact" )
19
+ print ("4.Print Contact" )
20
+ print ("5.Exit" )
20
21
print ("-----------------------" )
21
22
choice = int (input ("Enter choice: " ))
22
23
if choice == 1 :
@@ -27,6 +28,10 @@ def main():
27
28
address_book .update_contact (first_name )
28
29
29
30
elif choice == 3 :
31
+ first_name = input ("Enter first name to remove: " )
32
+ address_book .remove_contact (first_name )
33
+
34
+ elif choice == 4 :
30
35
address_book .display_contact ()
31
36
32
37
elif choice == 3 :
You can’t perform that action at this time.
0 commit comments