PYTHON

Create a list in Python

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)

OUTPUT….

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.