May-18-2017, 12:23 AM
Thanks man I will check that out. Funny I have run into an entirely new problem now
I am trying to write a delete function that asks the user for the nickname they want to delete then deletes the contact details associated with that nickname however I have two problems.
1. When my program goes to print
and 2.
How do I go about actually deleting an item from the list I dont think this function is written correctly and I would really really appreciate the help as I have a sh*tload of work to get through this month XD
I am trying to write a delete function that asks the user for the nickname they want to delete then deletes the contact details associated with that nickname however I have two problems.
1. When my program goes to print
reply = input("Delete Contact? "+str(Names)+"? [y/[n]] ")It shows every contact that is in the addressbook not the one that I want to be deleted
and 2.
How do I go about actually deleting an item from the list I dont think this function is written correctly and I would really really appreciate the help as I have a sh*tload of work to get through this month XD
def deletecontact(): z = input('Who would you like to delete (Enter nickname):') for nick in nicknames: if z in nicknames: reply = input("Delete Contact? "+str(Names)+"? [y/[n]] ") if z not in nicknames: print ("\nThis Contact Does Not Exist!!\n----------------------\n") if reply=='y': del z print('Contact has been DELETED') menu()Cheers in adv :)