Courseiva
Control Flow, Loops, Lists and LogiceasyMultiple SelectObjective-mapped

PCEP Control Flow, Loops, Lists and Logic Practice Question

Which two of the following list methods modify the original list in place? (Choose two.)

⚠ Common exam trap

Python Institute often tests the distinction between methods that mutate the list in place (like `sort()`) and functions that return a new list (like `sorted()`), as well as the fact that `count()` and `copy()` are non-mutating, to see if candidates confuse method behavior with function behavior.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

sort()

A is correct because the `sort()` method sorts the list in place, meaning it modifies the original list object without creating a new one. D is correct because `append()` adds an element to the end of the list, directly mutating the original list.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • sort()

    Why this is correct

    Sorts the list in place.

  • count()

    Why it's wrong here

    Returns count of elements, does not modify.

  • sorted()

    Why it's wrong here

    Returns a new sorted list, does not modify original.

  • append()

    Why this is correct

    Modifies the list by adding an element.

  • copy()

    Why it's wrong here

    Returns a shallow copy, does not modify original.

About these practice questions

This PCEP question is part of Courseiva's 498-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCEP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCEP exam.