Quiz on Python List Function



1. What is the purpose of the list() function in Python?
2. What will be the output of list(range(5))?
3. Which method is used to add an element to the end of a list?
4. How can you remove an item from a list by its value?
5. What does the extend() method do in a list?

Advertisements