Q. Write a function to delete an element from a sorted list.


Answer =




def dele(num):
    lst.remove(num)

lst = eval(input("Enter a sorted list :-"))
num = int(input("Enter a number :- "))
dele(num)
print("New list :-", lst)



Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post