CBSE Class 11 Informatics Practices Question 34 of 40

Practice Paper — Question 2

Back to all questions
2
Question

Question 31(b)

Consider the following list.

emp=["Aditya", 40000, "Deepak",50000, "Yashmit", 60000, "Bhavya", 80000]

(i) To Insert the value "Ramit" at index number 4.

(ii) To check whether element 50000 is present in the list or not.

(iii) To display the first 3 elements from the list.

(iv) To remove the fifth element from the list.

Answer

(i)

emp.insert(4, "Ramit")

(ii)

50000 in emp

(iii)

print(emp[:3])

(iv)

del emp[4]