PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which TWO of the following are Python membership operators?
⚠ Common exam trap
Python Institute often tests the distinction between membership operators ('in', 'not in') and identity operators ('is', 'is not'), as candidates frequently confuse 'is' with 'in' or mistake 'not' as a standalone membership operator when it must be paired with 'in'.
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
✓
not in
'not in' is a Python membership operator that returns True if a value is not found in a sequence (like a list, tuple, or string). Option C is correct because 'in' is the complementary membership operator that returns True if a value is found in a sequence. Both are used to test membership in iterable objects.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
not
Why it's wrong here
Logical operator.
- ✓
not in
Why this is correct
Membership operator.
- ✓
in
Why this is correct
Membership operator.
- ✗
is
Why it's wrong here
Identity operator.
- ✗
and
Why it's wrong here
Logical operator.
Go deeper
Related to this question
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 →
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.