List Quiz

Python List Quiz

Python List - 15 MCQ Quiz

1. Which of the following is a valid way to create a list in Python?




2. Lists in Python are ____.




3. Which function is used to find the length of a list?




4. What is the index of the first element in a Python list?




5. What will be the output of len([10, 20, 30, 40])?




6. What method adds an element to the end of a list?




7. Which method removes the last element from a list?




8. What is the output of [1,2,3] + [4,5]?




9. How can you access the last element of a list named my_list?




10. What does my_list.clear() do?




11. Which method is used to sort a list in ascending order?




12. What is the result of list(range(3))?




13. What is the output of sum([1,2,3,4])?




14. What will be the result of min([3,1,4,2])?




15. Which of the following converts a string into a list of characters?




Comments

Popular posts from this blog

Topic1 :- What is Python Programming?

Topic2: -Why Python?

Topic7: What is Numpy?