I am doing a menu driven program in python to insert and delete items in a list. I have a list containing integers and strings. I want to delete integer.
So I take input from user as
list = [1, 2, 3, "hi", 5]
x = input("enter the value to be deleted")
# input is given as 2
list.remove(x)
But it gives me a ValueError
I typecasted the input to int and it worked for integers but not for the string.