n = int(input("Enter number of elements: ")) lst = [] for i in range(n): value = input(f"Enter element {i+1}: ") lst.append(value) print("Dynamic List:", lst) stu_lst.pop(lst.index('Vikram')) lst.append('Jay') lst.remove(lst[2]) print(lst)
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
© Copyright CODEMANIAC STUDIO ™