Q.Which of the following is the correct identifier? (A) global (B) Break (C) def (D) with
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →The question asks which of the given options is a valid identifier in Python. An identifier is a name used for variables, functions, etc. The correct answer is (B) Break, because it is not a reserved keyword (Python is case-sensitive, so Break differs from the keyword break), while the others are all reserved keywords.
The Concept: What Makes a Valid Identifier in Python?
In Python, an identifier is simply a name you give to a variable, function, class, or other object. The rules are strict:
- It must start with a letter (a–z, A–Z) or an underscore (
_). - The rest can be letters, digits (0–9), or underscores.
- It cannot be a reserved keyword (like
if,for,def,global, etc.). - Python is case-sensitive, so
Breakandbreakare different names.
The trick here is that the options mix keywords and non-keywords, and case-sensitivity is the deciding factor. Let's check each one.
Step-by-Step Reasoning
-
Option (A):
globalglobalis a Python keyword used to declare a variable as global inside a function. Since it's a reserved word, it cannot be used as an identifier. So this is invalid. -
Option (B):
BreakPython has a keyword
break(all lowercase) used to exit loops. ButBreakwith a capital B is a different string. Python is case-sensitive, soBreakis not a keyword — it's a perfectly valid identifier. You could name a variableBreakif you wanted (though it's not recommended for readability). This is the correct choice. -
Option (C):
def…
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.