Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 11
Informatics Practices
Informatics Practices
Working with Lists and Dictionaries
Question Bank

Question Bank - Working with L...

Practice Hub

Question Bank: Working with Lists and Dictionaries

This chapter explores lists and dictionaries, two essential data structures in programming, explaining their functions and importance for data manipulation.

Structured practice

Question Bank - Working with Lists and Dictionaries

Q1.

Which of the following is the correct syntax to create a list in Python?

Single Answer MCQ
Q-00066555
View explanation
Q2.

What will be the output of the following code: print([1, 2, 3] + [4, 5])?

Single Answer MCQ
Q-00066556
View explanation
Q3.

What does the index -1 refer to in a list?

Single Answer MCQ
Q-00066557
View explanation
Q4.

Which function would you use to find the largest number in a list?

Single Answer MCQ
Q-00066558
View explanation
Q5.

If list1 = [10, 20, 30, 40] and you execute list1[2] = 100, what will list1 look like?

Single Answer MCQ
Q-00066559
View explanation
Q6.

What is the outcome of executing sorted([3, 1, 2])?

Single Answer MCQ
Q-00066560
View explanation
Q7.

Which method would you use to remove the first occurrence of a value from a list?

Single Answer MCQ
Q-00066561
View explanation
Q8.

What will be the output of the code: print([1, 2] * 3)?

Single Answer MCQ
Q-00066562
View explanation
Q9.

If myList = [5, 10, 15] and you execute myList.append(20), what will myList look like?

Single Answer MCQ
Q-00066563
View explanation
Q10.

What is the error in running this code: print([1, 2, 3][5])?

Single Answer MCQ
Q-00066564
View explanation
Q11.

What would be the result of executing: list1 = [1, 2, 3], list1 += [4, 5]?

Single Answer MCQ
Q-00066565
View explanation
Q12.

How would you create a list containing the first five square numbers?

Single Answer MCQ
Q-00066566
View explanation
Q13.

Which of the following statements is true about Python lists?

Single Answer MCQ
Q-00066567
View explanation
Q14.

If a list is defined as list1 = [1, 2, 3], which statement will create a copy of this list?

Single Answer MCQ
Q-00066568
View explanation
Q15.

What is the result of executing: [1, 2, 3] + [4] * 2?

Single Answer MCQ
Q-00066569
View explanation
Q16.

What is the correct syntax to create a list in Python?

Single Answer MCQ
Q-00066570
View explanation
Q17.

How do you access the first element of a list named 'myList'?

Single Answer MCQ
Q-00066571
View explanation
Q18.

Which of the following is a valid list in Python?

Single Answer MCQ
Q-00066572
View explanation
Q19.

What will the expression list1[2] return for the list list1 = [2, 4, 6, 8]?

Single Answer MCQ
Q-00066573
View explanation
Q20.

What will be the output of len(list3) if list3 = [100, 23.5, 'Hello']?

Single Answer MCQ
Q-00066574
View explanation
Q21.

What is the output of list1[-1] if list1 = [10, 20, 30]?

Single Answer MCQ
Q-00066575
View explanation
Q22.

What type of data can be stored in a Python list?

Single Answer MCQ
Q-00066576
View explanation
Q23.

Which command would throw an 'IndexError' for the list list1 = [0, 1, 2]?

Single Answer MCQ
Q-00066577
View explanation
Q24.

If list4 contains elements [['Math', 101], ['English', 102]], what does list4[0][1] return?

Single Answer MCQ
Q-00066578
View explanation
Q25.

Which of the following statements will correctly append an item to a list 'myList'?

Single Answer MCQ
Q-00066579
View explanation
Q26.

What does the expression list1[1:4] return for list1 = [0, 1, 2, 3, 4, 5]?

Single Answer MCQ
Q-00066580
View explanation
Q27.

If list5 contains [1, 2, 3, 4], what will list5[-2] return?

Single Answer MCQ
Q-00066581
View explanation
Q28.

What will be the output of the expression myList = [1, 2, 3]; myList * 2?

Single Answer MCQ
Q-00066582
View explanation
Q29.

In which situation would using negative indexing be beneficial?

Single Answer MCQ
Q-00066583
View explanation
Q30.

If you have the following list: myList = [2, 4, 6, 8, 10], what would be the value of myList[1:3]?

Single Answer MCQ
Q-00066584
View explanation
Q31.

Given a list defined as list = [5, 3, 9, 1], which method is used to sort this list in ascending order?

Single Answer MCQ
Q-00066585
View explanation
Q32.

What will be the output of the following code? list1 = [1, 2, 3, 4, 5] for item in list1: print(item)

Single Answer MCQ
Q-00066586
View explanation
Q33.

Which index will return the last element of the list in Python code? list1 = [10, 20, 30, 40]

Single Answer MCQ
Q-00066587
View explanation
Q34.

How can you access the third element in a list named 'my_list'?

Single Answer MCQ
Q-00066588
View explanation
Q35.

What does the len() function return for list1 = [5, 10, 15]?

Single Answer MCQ
Q-00066589
View explanation
Q36.

What will be the output of: list1 = [1, 2, 3] print(list1[1:3])?

Single Answer MCQ
Q-00066590
View explanation
Q37.

Which of the following correctly initializes an empty list in Python?

Single Answer MCQ
Q-00066591
View explanation
Q38.

How can you iterate over the elements of a list named myList using a for loop?

Single Answer MCQ
Q-00066592
View explanation
Q39.

What will be the output of: list1 = [1, 2, 3] for i in range(len(list1)): print(list1[i])?

Single Answer MCQ
Q-00066593
View explanation
Q40.

If list1 = [10, 20, 30] and you execute list1.append(40), what will list1 become?

Single Answer MCQ
Q-00066594
View explanation
Q41.

What is the result of list1 = [1, 2, 3, 4] list1[1:3]?

Single Answer MCQ
Q-00066595
View explanation
Q42.

How do you reverse the list called myList?

Single Answer MCQ
Q-00066596
View explanation
Q43.

Given the list: myList = [5, 'test', 12.3], what will myList[1] return?

Single Answer MCQ
Q-00066597
View explanation
Q44.

What error do you encounter when trying to access an index that exceeds the list size?

Single Answer MCQ
Q-00066598
View explanation
Q45.

Which method can insert an element at a specific index of a list?

Single Answer MCQ
Q-00066599
View explanation
Q46.

If you have a list of numbers, how do you access the second last number?

Single Answer MCQ
Q-00066600
View explanation
Q47.

What will the output be of: print('List:', list1[::-1]) where list1 = [1, 2, 3]?

Single Answer MCQ
Q-00066601
View explanation
Q48.

What will be the result of the following code? list1 = [1, 2, 3]; list1.append(4); print(list1)

Single Answer MCQ
Q-00066602
View explanation
Q49.

Which function is used to determine the number of elements in a list?

Single Answer MCQ
Q-00066603
View explanation
Q50.

What is the output of the code: list1 = [5, 10, 15]; list1.insert(1, 7); print(list1)?

Single Answer MCQ
Q-00066604
View explanation
Q51.

Which of the following methods can be used to add elements from one list to another?

Single Answer MCQ
Q-00066605
View explanation
Q52.

What will the command sorted([3, 1, 2]) return?

Single Answer MCQ
Q-00066606
View explanation
Q53.

Which method would you use to remove an item at a specific index from a list?

Single Answer MCQ
Q-00066607
View explanation
Q54.

If list1 = [1, 2, 3, 4, 5], what does list1[-1] return?

Single Answer MCQ
Q-00066608
View explanation
Q55.

Consider list1 = [10, 20, 30, 40]; what will be the result of list1[1:3]?

Single Answer MCQ
Q-00066609
View explanation
Q56.

What will the output of 'list1 = [1, 2, 2, 3]; list1.count(2)' be?

Single Answer MCQ
Q-00066610
View explanation
Q57.

Given list2 = [6, 7, 8]; what does list2 * 2 produce?

Single Answer MCQ
Q-00066611
View explanation
Q58.

What will the command 'myList = [3,2,1]; myList.reverse()' do?

Single Answer MCQ
Q-00066612
View explanation
Q59.

If list1 = [3, 2, 4], what does max(list1) return?

Single Answer MCQ
Q-00066613
View explanation
Q60.

What is the output of list1 = [1, 2, 3]; del list1[1]; print(list1)?

Single Answer MCQ
Q-00066614
View explanation
Q61.

How do you create an empty list?

Single Answer MCQ
Q-00066615
View explanation
Q62.

What happens if you try to access an index that is out of range?

Single Answer MCQ
Q-00066616
View explanation
Q63.

Which operator is used to concatenate two lists?

Single Answer MCQ
Q-00066617
View explanation
Q64.

Which method returns the number of key-value pairs in a dictionary?

Single Answer MCQ
Q-00066618
View explanation
Q65.

What will dict1.keys() return for dict1 = {'A': 1, 'B': 2}?

Single Answer MCQ
Q-00066619
View explanation
Q66.

What does dict1.get('key') return if 'key' does not exist in dict1?

Single Answer MCQ
Q-00066620
View explanation
Q67.

Which method would you use to update a dictionary with another dictionary's values?

Single Answer MCQ
Q-00066621
View explanation
Q68.

What will be the output of 'dict1 = {1: 'one', 2: 'two'}; dict1[3]'?

Single Answer MCQ
Q-00066622
View explanation
Q69.

To remove all items from a dictionary, which method is used?

Single Answer MCQ
Q-00066623
View explanation
Q70.

What data type does dict1.items() return?

Single Answer MCQ
Q-00066624
View explanation
Q71.

What will be the result of executing dict1.update({'A': 1}) when dict1 = {'A': 2}?

Single Answer MCQ
Q-00066625
View explanation
Q72.

Which of the following will correctly create a dictionary?

Single Answer MCQ
Q-00066626
View explanation
Q73.

If dict1 = {'A': 1, 'B': 2} and you perform dict1.pop('B'), what will dict1 become?

Single Answer MCQ
Q-00066627
View explanation
Q74.

Which method will you use to get values from a dictionary into a list format?

Single Answer MCQ
Q-00066628
View explanation
Q75.

What does dict1['key'] return when 'key' is not present in dict1?

Single Answer MCQ
Q-00066629
View explanation
Q76.

In a dictionary, how can you retrieve a default value if a key is not found?

Single Answer MCQ
Q-00066630
View explanation
Q77.

Which method would clear all items from dict1?

Single Answer MCQ
Q-00066631
View explanation
Q78.

What does dict1.popitem() return?

Single Answer MCQ
Q-00066632
View explanation
Q79.

Which method converts a sequence of key-value pairs into a dictionary?

Single Answer MCQ
Q-00066633
View explanation
Q80.

What is the correct syntax to create an empty dictionary in Python?

Single Answer MCQ
Q-00066634
View explanation
Q81.

Which statement about dictionary keys in Python is correct?

Single Answer MCQ
Q-00066635
View explanation
Q82.

Given the dictionary dict3 = {'a':1, 'b':2, 'c':3}, what is dict3['b']?

Single Answer MCQ
Q-00066636
View explanation
Q83.

What will the following code output? dict3 = {'x': 1, 'y': 2}; print(dict3.get('z', 0))

Single Answer MCQ
Q-00066637
View explanation
Q84.

How can you add a new key-value pair to an existing dictionary?

Single Answer MCQ
Q-00066638
View explanation
Q85.

What type of data structure is a dictionary in Python?

Single Answer MCQ
Q-00066639
View explanation
Q86.

In the dictionary dict2 = {'name': 'Alice', 'age': 25}, which of the following expressions accesses the name?

Single Answer MCQ
Q-00066640
View explanation
Q87.

If a dictionary has duplicate keys, what happens when it is created?

Single Answer MCQ
Q-00066641
View explanation
Q88.

How can you delete a key-value pair from a dictionary?

Single Answer MCQ
Q-00066642
View explanation
Q89.

What will be returned when you call dict2 = {'key': 'value'}; dict2.keys()?

Single Answer MCQ
Q-00066643
View explanation
Q90.

Which of the following will raise a KeyError?

Single Answer MCQ
Q-00066644
View explanation
Q91.

Given a dictionary, how would you change the value associated with an existing key?

Single Answer MCQ
Q-00066645
View explanation
Q92.

What is the output of the expression len({'a': 1, 'b': 2})?

Single Answer MCQ
Q-00066646
View explanation
Q93.

Which of the following represents a valid dictionary with mixed value types?

Single Answer MCQ
Q-00066647
View explanation
Q94.

If you want to retrieve a value and handle the case where the key might not exist, which method would you use?

Single Answer MCQ
Q-00066648
View explanation
Q95.

Which of the following statements is true regarding dictionary items?

Single Answer MCQ
Q-00066649
View explanation
Q96.

What is the primary way to traverse a dictionary in Python?

Single Answer MCQ
Q-00066650
View explanation
Q97.

Given the dictionary `dict1 = {'a': 1, 'b': 2, 'c': 3}`, what will be printed by the following code? `for k, v in dict1.items(): print(k, v)`

Single Answer MCQ
Q-00066651
View explanation
Q98.

What happens if you try to access a key that does not exist in a dictionary using the `get` method?

Single Answer MCQ
Q-00066652
View explanation
Q99.

In a dictionary, how can you find the number of key-value pairs?

Single Answer MCQ
Q-00066653
View explanation
Q100.

What will the statement `dict1.update({'d': 4})` do if `dict1` is originally `{'a': 1, 'b': 2}`?

Single Answer MCQ
Q-00066654
View explanation
Q101.

When using the `keys()` method on a dictionary, what is returned?

Single Answer MCQ
Q-00066655
View explanation
Q102.

What is the output of the following code? `dict1 = {'a': 1, 'b': 2}; print(dict1.get('c'))`

Single Answer MCQ
Q-00066656
View explanation
Q103.

Which of the following will give you both the keys and values of a dictionary in one structure?

Single Answer MCQ
Q-00066657
View explanation
Q104.

How would you clear all items from a dictionary `dict1`?

Single Answer MCQ
Q-00066658
View explanation
Q105.

If `dict1 = {'x': 1, 'y': 2, 'z': 3}`, what will `for k in dict1:` output?

Single Answer MCQ
Q-00066659
View explanation
Q106.

If you want to merge two dictionaries `dict1 = {'a': 1}` and `dict2 = {'b': 2}`, which method would you likely use?

Single Answer MCQ
Q-00066660
View explanation
Q107.

What is the output of `dict1 = {'a': 1, 'b': 2}; print(dict1.get('b', 3))`?

Single Answer MCQ
Q-00066661
View explanation
Q108.

What method would you use to retrieve all keys from a dictionary named 'data'?

Single Answer MCQ
Q-00066662
View explanation
Q109.

Which of the following methods returns only the values of a dictionary?

Single Answer MCQ
Q-00066663
View explanation
Q110.

If you want to check the existence of the key 'name' in the dictionary 'user', which statement would you use?

Single Answer MCQ
Q-00066664
View explanation
Q111.

If a dictionary has nested dictionaries, which method could help to flatten or access inner values efficiently?

Single Answer MCQ
Q-00066665
View explanation
Q112.

Which method adds a new key-value pair to an existing dictionary in Python?

Single Answer MCQ
Q-00066666
View explanation
Q113.

When traversing a dictionary, what common error might you encounter if you modify the dictionary during iteration?

Single Answer MCQ
Q-00066667
View explanation
Q114.

What will happen if you try to access a key that does not exist in a dictionary using the get() method?

Single Answer MCQ
Q-00066668
View explanation
Q115.

What will be the output of the following code if executed? `dict1 = {'a': 1, 'b': 2}; for key in dict1.keys(): dict1[key] += 1; print(dict1)`?

Single Answer MCQ
Q-00066669
View explanation
Q116.

If you delete a key 'age' from a dictionary, how can you confirm it has been removed?

Single Answer MCQ
Q-00066670
View explanation
Q117.

What is the output of 'len({})' in Python?

Single Answer MCQ
Q-00066671
View explanation
Q118.

How would you modify the value of an existing key in a dictionary?

Single Answer MCQ
Q-00066672
View explanation
Q119.

Which function will return a list of all values in a dictionary called 'grades'?

Single Answer MCQ
Q-00066673
View explanation
Q120.

What will be the output of the following code: 'd = {1: 'a', 2: 'b'}; print(d[1])'?

Single Answer MCQ
Q-00066674
View explanation
Q121.

What is the main characteristic of a dictionary in Python?

Single Answer MCQ
Q-00066675
View explanation
Q122.

You have a dictionary myDict and want to remove the item with key 'x'. Which of the following is correct?

Single Answer MCQ
Q-00066676
View explanation
Q123.

What will 'd.get(5, 'Not Found')' return if key 5 does not exist?

Single Answer MCQ
Q-00066677
View explanation
Q124.

How can you convert the keys of a dictionary named 'sampleDict' to a list?

Single Answer MCQ
Q-00066678
View explanation
Q125.

In what scenario would using preset default values with get() be most useful?

Single Answer MCQ
Q-00066679
View explanation
Q126.

How would you efficiently clear all items from a dictionary named 'cache'?

Single Answer MCQ
Q-00066680
View explanation
Q127.

What does the len() function return when applied to a list?

Single Answer MCQ
Q-00104210
View explanation
Q128.

Which method would you use to add an element at index 2 of a list?

Single Answer MCQ
Q-00104211
View explanation
Q129.

What does the pop() method do when called with no arguments?

Single Answer MCQ
Q-00104212
View explanation
Q130.

If list1 = [10, 20, 30, 20], what will list1.count(20) return?

Single Answer MCQ
Q-00104213
View explanation
Q131.

What is the result of executing list1.reverse() on the list [5, 3, 8]?

Single Answer MCQ
Q-00104214
View explanation
Q132.

When would you use the extend() method over append()?

Single Answer MCQ
Q-00104215
View explanation
Q133.

What will result from executing list1.remove(10) on the list [10, 20, 10]?

Single Answer MCQ
Q-00104216
View explanation
Q134.

Which method is used to determine the first index of a specific element in a list?

Single Answer MCQ
Q-00104217
View explanation
Q135.

Which of the following methods does not modify the original list?

Single Answer MCQ
Q-00104218
View explanation
Q136.

If list1 = [2, 3, 5], what will list1[1 + 1] return?

Single Answer MCQ
Q-00104219
View explanation
Q137.

What will be the output of sorting the list ['d', 'c', 'b', 'a']?

Single Answer MCQ
Q-00104220
View explanation
Q138.

Which of the following methods can cause a ValueError if the element is not found?

Single Answer MCQ
Q-00104221
View explanation
Q139.

What will be the output of the following code: list1 = [1, 2, 3]; list1.sort(reverse=True)?

Single Answer MCQ
Q-00104222
View explanation
Q140.

Which method removes all occurrences of a specified value from a list?

Single Answer MCQ
Q-00104223
View explanation
Q141.

If you want to combine two lists into one list, which method would you use?

Single Answer MCQ
Q-00104224
View explanation
Learn Better On The App
Gamified progress

Learning That Feels Rewarding

Earn XP, unlock badges, and turn revision into a habit that feels motivating.

XP and badges
Higher engagement

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview