VIVA Questions with Answers
Lists in Python (Class 9 – CBSE 417)
1. What is a list in Python?
A list is a collection of ordered and changeable elements stored in a single variable.
2. How is a list different from a tuple?
A list is mutable, whereas a tuple is immutable.
3. How do you create an empty list in Python?
list1 = []
4. Write the syntax to create a list containing numbers.
numbers = [1, 2, 3, 4]
5. Can a list store different data types?
Yes, a list can store elements of different data types.
6. How are elements in a list indexed?
List elements are indexed starting from 0.
7. What is positive indexing?
Positive indexing starts from 0 and moves left to right.
8. What is negative indexing?
Negative indexing starts from -1 and moves right to left.
9. How do you access the first and last elements of a list?
list1[0] – First element
list1[-1] – Last element
10. What is list slicing?
List slicing is used to extract a portion of a list.
11. How do you add an element using append()?
list1.append(10)
12. Difference between append() and insert()?
append() adds an element at the end, while insert() adds an element at a specific position.
13. How do you remove an element using remove()?
list1.remove(5)
14. What does the pop() method do?
It removes and returns the last element of the list.
15. How do you find the length of a list?
len(list1)
16. What is list traversal?
Accessing each element of a list one by one is called list traversal.
17. Can a list be modified after creation?
Yes, because lists are mutable.
18. What happens if an invalid index is accessed?
Python generates an IndexError.
19. What is a nested list?
A list inside another list is called a nested list.
20. Give one real-life example of list usage.
A list can be used to store marks of students.


