Computer Science - Informatics Practices Class XI/XII Python List Solved Test Part 8
Q1. Explain the following functions in reference to list with example
a. count()
b. clear()
c. pop()
d. remove()
Q2. What is the difference between del statement and pop() function.
Q3. Write the output of the following:
Q4. Out of del and pop() which one return the deleted element.
Q5. remove()
function take _______ (element/index) as argument.
Q6. Name a
function/statement which can delete more than one element from the list.
Q7. Name a
function which can delete only one element from the list.
Q8. Write a
program to delete/remove all the negative elements from the list.
Q9. Write a
program to delete/remove all the odd numbers from the list.
Q10. Write a
program to delete/remove all the numbers less than 10 from the list.
No comments:
Post a Comment