Courseiva
Computer Programming and Python FundamentalshardMultiple SelectObjective-mapped

PCEP Computer Programming and Python Fundamentals Practice Question

Which two of the following are true about Python lists? (Choose two.)

⚠ Common exam trap

The traps here include confusing list mutability with immutability, assuming indexing starts from 1, and mistakenly believing lists can be used as dictionary keys.

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

Lists can contain elements of different data types.

Only two options are correct: A and E. Option A is correct because Python lists can contain elements of different data types. Option E is correct because len() returns the number of elements in a list. Options B, C, D are incorrect: B is wrong because lists are mutable and unhashable, hence cannot be dictionary keys; C is wrong because index starts at 0; D is wrong because lists are mutable.

Answer analysis

Option-by-option breakdown

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

  • Lists can contain elements of different data types.

    Why this is correct

    Correct. Python lists are heterogeneous containers; they can store elements of different data types.

  • Lists can be used as dictionary keys.

    Why it's wrong here

    Incorrect. Lists are mutable and unhashable, so they cannot be used as dictionary keys.

  • Lists are indexed starting from 1.

    Why it's wrong here

    Incorrect. List indexing starts at 0, not 1.

  • Lists are immutable.

    Why it's wrong here

    Incorrect. Lists are mutable; their elements can be changed after creation.

  • The len() function returns the number of elements.

    Why this is correct

    Correct. The len() function returns the number of elements in a list.

About these practice questions

Courseiva writes every PCEP question from scratch — 498 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.