Working with Chapter Lists and Dictionaries | Class 11 Informatics Practices Notes
By ConceptScroll Team · Published on 17 July 2026 · 3 min read
Working with Chapter Lists and Dictionaries – this guide gives you a concise, exam-ready overview of Working with Chapter Lists and Dictionaries from Class 11 Informatics Practices, written by ConceptScroll editors and reviewed against the latest NCERT textbook.
4.1.1 Accessing Elements in a List
Accessing elements in a list is done using indexing, where each element is assigned a position number starting from 0 for the first element. This zero-based indexing means the first element is at index 0, the second at index 1, and so forth. To access an element, the list name is followed by square brackets containing the index value. For example, list1[0] returns the first element of list1. Python also supports negative indexing, where -1 refers to the last element, -2 to the second last, and so on, allowing easy access from the end of the list. If an index outside the valid range is used, Python raises an IndexError. The length of a list can be found using the len() function, which returns the total number of elements. Using the length, the last element can be accessed by list1[len(list1) - 1] or equivalently list1[-1]. This indexing mechanism is fundamental for list traversal and manipulation.
📊 Diagram: A diagram illustrating a list with elements labeled by their index positions starting from 0 on the left and negative indices starting from -1 on the right, showing how elements can be accessed using both positive and negative indices.
🧪 Activity: No specific activity in this section.
🔗 Connection: This section prepares the learner for understanding list mutability and operations by explaining how to access individual elements.
Frequently asked questions
1. What will be the output of the following statements? a) list1 = [12,32,65,26,80,10] list1.sort() print(list1) b) list1 = [12,32,65,26,80,10] sorted(list1) print(list1) c) list1 = [1,2,3,4,5,6,7,8,9,10] list1[::-2] list1[:3] + list1[3:] d) list1 = [1,2,3,4,5] list1[len(list1)-1]
a) list1.sort() sorts the list in place. So after sorting, list1 becomes [10, 12, 26, 32, 65, 80]. The print statement outputs: [10, 12, 26, 32, 65, 80]
b) sorted(list1) returns a new sorted list but does not modify list1 itself. Since the returned sorted list is not assigned, list1 remains unchanged. So print(list1) outputs: [12, 32, 65, 26, 80, 10]
c) list1[::-2] returns a slice starting from the end towards the start, stepping by 2. So it picks elements at indices 9,7,5,3,1 (0-based): [10,8
2. Consider the following list myList. What will be the elements of myList after each of the following operations? myList = [10,20,30,40] a) myList.append([50,60]) b) myList.extend([80,90])
Initial list: myList = [10, 20, 30, 40]
a) myList.append([50,60]) adds the entire list [50,60] as a single element at the end. So myList becomes: [10, 20, 30, 40, [50, 60]]
b) myList.extend([80,90]) adds each element of the list [80,90] individually to the end of myList. So after extending, myList becomes: [10, 20, 30, 40, [50, 60], 80, 90]
3. What will be the output of the following code segment? myList = [1,2,3,4,5,6,7,8,9,10] for i in range(0,len(myList)): if i%2 == 0: print(myList[i])
The code iterates over indices 0 to 9 of myList. For each index i, if i is even (i%2 == 0), it prints myList[i]. Indices 0,2,4,6,8 are even. Corresponding elements are: 1, 3, 5, 7, 9. Hence, output will be: 1 3 5 7 9
4. What will be the output of the following code segment? a) myList = [1,2,3,4,5,6,7,8,9,10] del myList[3:] print(myList) b) myList = [1,2,3,4,5,6,7,8,9,10] del myList[:5] print(myList) c) myList = [1,2,3,4,5,6,7,8,9,10] del myList[::2] print(myList)
a) del myList[3:] deletes elements from index 3 to end. Original list: [1,2,3,4,5,6,7,8,9,10] After deletion: [1,2,3] Output: [1, 2, 3]
b) del myList[:5] deletes elements from start to index 4. Original list: [1,2,3,4,5,6,7,8,9,10] After deletion: [6,7,8,9,10] Output: [6, 7, 8, 9, 10]
c) del myList[::2] deletes elements at indices 0,2,4,6,8. Original list: [1,2,3,4,5,6,7,8,9,10] Elements at indices 0,2,4,6,8 are 1,3,5,7,9. After deletion, remaining elements are at indices 1,3,5,7,9: 2,4,6,8,10
Ready to ace this chapter?
Get the full Working with Chapter Lists and Dictionaries chapter — interactive notes, diagrams, worked solutions, polls and a free practice quiz — in the ConceptScroll app.
Study smarter with ConceptScroll
Daily NCERT-aligned reels, AI doubt solving and chapter quizzes — all free.
Start learning freeContinue reading
- Introduction to Chapter Structured Query 8 Language (SQL) | Class 11 Informatics Practices Notes
Clear NCERT-aligned notes on Introduction to Chapter Structured Query 8 Language (SQL) for Class 11 Informatics Practices.
- Introduction to Chapter Structured Query 8 Language (SQL) | Class 11 Informatics Practices Notes
Clear NCERT-aligned notes on Introduction to Chapter Structured Query 8 Language (SQL) for Class 11 Informatics Practices.
- Introduction to Chapter Structured Query 8 Language (SQL) | Class 11 Informatics Practices Notes
Clear NCERT-aligned notes on Introduction to Chapter Structured Query 8 Language (SQL) for Class 11 Informatics Practices.