There are following steps:
Get input from the User. Use raw_input() to get values.
Note use input() for Python 3.x
e.g.
>>> nos_items = 10
>>> input_list = []
>>> while nos_items>0:
... input_list.append(raw_input("Enter Item in the input List: "))
... nos_items -= 1
...
Enter Item in the input List: a
Enter Item in the input List: b
Enter Item in the input List: c
Enter Item in the input List: d
Enter Item in the input List: e
Enter Item in the input List: f
Enter Item in the input List: g
Enter Item in the input List: h
Enter Item in the input List: i
Enter Item in the input List: j
>>> input_list
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
Get delete index number from the user. Index start from 0. Do type casting to convert string to int
e.g.
>>> del_index = int(raw_input("Enter delete item index:"))
Enter delete item index:3
>>> del_index
3
>>>
Use pop() to delete item from the list.
e.g.
>>> input_list
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
>>> input_list.pop(del_index)
'd'
>>> input_list
['a', 'b', 'c', 'e', 'f', 'g', 'h', 'i', 'j']
Handle exception for boundary.
>>> imput_list.pop(33)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: pop index out of range
>>> try: imput_list.pop(33)
... except IndexError:
... print "Index out of range."
...
Index out of range.