Q:

Adding user input to a list , then deleting it if the input exists in the list or appending it if it does not

So I want to ask a user to enter a letter for a pre-made list. If that letter already exists in that list , I want to have that letter deleted , if it does not exists in the list , I want it appended to the list.
This is the code I'm using right now :  
list1= ['a','b','c','d','e']
letter=input("please input a letter ")
for letter in list1:
    if letter in list1:
         del list1[letter]
         print(list1)
    else:
         print(list1.append(letter)

It gives the type-error that list indices must be integers not string. How do I go about this ?

A:

You will need to pop the letter at the index. Also there is no need for the for loop. Edited answer to incorporate @lukasz comment.
list1= ['a','b','c','d','e']
letter=input("please input a letter ")
if letter in list1:
    list1.remove(letter)
else:
    print(list1.append(letter))

