PCEP Python Collections Fundamentals Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11220 | Total Attempts: 140,660
| Attempts: 11 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #--
0 %
0/100
Score 0/100

1. What is the output of `my_list = [1, 2, 3]; my_list.append(4); print(len(my_list))`?

Submit
Please wait...
About This Quiz
PCEP Python Collections Fundamentals Quiz - Quiz

This quiz evaluates your understanding of Python collections\u2014lists, tuples, dictionaries, and sets. Master the core data structures used in PCEP certification, including creation, manipulation, and iteration. Test your knowledge of collection methods, indexing, and practical application in real-world Python programs.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. What is the output of `len({'a': 1, 'b': 2, 'c': 3})`?

Submit

3. Which method removes and returns the last element from a list?

Submit

4. What does `my_dict = {'a': 1, 'b': 2}; my_dict['c'] = 3` result in?

Submit

5. Which statement is true about list comprehensions?

Submit

6. What does `my_list[1:3]` return from `my_list = [0, 1, 2, 3, 4]`?

Submit

7. Which collection type uses key-value pairs?

Submit

8. Which method removes all elements from a list?

Submit

9. What is the result of `{1, 2, 3} & {2, 3, 4}`?

Submit

10. Which collection type in Python is ordered, mutable, and allows duplicate elements?

Submit

11. What is the correct syntax to access the first element of a list named `items`?

Submit

12. Which of the following is an unordered collection with no duplicates?

Submit

13. What does `my_tuple = (1,); print(type(my_tuple))` output?

Submit

14. The `list.insert(index, value)` method inserts a value at a specified ____.

Submit

15. The method `dict.keys()` returns ____ of the dictionary.

Submit

16. Negative indexing in lists starts from ____.

Submit

17. The `dict.get(key)` method returns None if the key does not exist, rather than raising a ____.

Submit

18. Sets in Python automatically ____ duplicate values.

Submit

19. Tuples in Python are ____.

Submit

20. The `sorted()` function returns a new ____ containing sorted elements.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is the output of `my_list = [1, 2, 3]; my_list.append(4);...
What is the output of `len({'a': 1, 'b': 2, 'c': 3})`?
Which method removes and returns the last element from a list?
What does `my_dict = {'a': 1, 'b': 2}; my_dict['c'] = 3` result in?
Which statement is true about list comprehensions?
What does `my_list[1:3]` return from `my_list = [0, 1, 2, 3, 4]`?
Which collection type uses key-value pairs?
Which method removes all elements from a list?
What is the result of `{1, 2, 3} & {2, 3, 4}`?
Which collection type in Python is ordered, mutable, and allows...
What is the correct syntax to access the first element of a list named...
Which of the following is an unordered collection with no duplicates?
What does `my_tuple = (1,); print(type(my_tuple))` output?
The `list.insert(index, value)` method inserts a value at a specified...
The method `dict.keys()` returns ____ of the dictionary.
Negative indexing in lists starts from ____.
The `dict.get(key)` method returns None if the key does not exist,...
Sets in Python automatically ____ duplicate values.
Tuples in Python are ____.
The `sorted()` function returns a new ____ containing sorted elements.
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!