Informatics Practices

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.

Python List Manipulation

1 Like

Answer

(i)

emp.insert(4, "Ramit")

(ii)

50000 in emp

(iii)

print(emp[:3])

(iv)

del emp[4]

Answered By

1 Like


Related Questions