Skip to content
Question 58 of 97

Q.Which of the following is a valid keyword in Python?

(a) false
(b) return
(c) non_local
(d) none
Odisha ChseCBSE Class XII Board 2023MCQ· 1mImportance★★★★★
60% · 58/97 Questions
🔒 Locked · start free trial →

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 only valid Python keyword among the options is return, as false, non_local, and none are either incorrectly cased or misspelled versions of actual keywords.

Python keywords are special reserved words that have specific meanings and purposes in the language. They cannot be used as identifiers (like variable names, function names, or class names) because they are integral to Python's syntax and structure. Understanding keywords is fundamental to writing correct and readable Python code.

The core idea here is to identify which of the given strings is an exact match for one of Python's reserved keywords, paying close attention to spelling and case sensitivity. Python is a case-sensitive language, meaning False is different from false, and None is different from none.

  1. Understanding Python Keywords:

    Python has a fixed set of keywords. These words are reserved by the language and cannot be used for any other purpose, such as naming variables or functions. They are essential for defining the structure and logic of Python programs. For example, if, else, for, while, def, class, import, return, True, False, None are all keywords.

  2. Analyzing Option (a) false:

    The string false is not a valid keyword in Python. Python uses False (with a capital 'F') as a keyword to represent the boolean value for falsity. Because Python is case-sensitive, false (lowercase 'f') is treated as a regular identifier, not a keyword.

    Watch out

    Python keywords are case-sensitive. false is not the same as False. Similarly, true is not the same as True, and none is not the same as None.

  3. Analyzing Option (b) return:

    The string return is a valid keyword in Python. It is used within functions to send a value back to the caller and to exit the function's execution.

    def function_name(parameters):

    # function body

    return value

  4. Analyzing Option (c) non_local: …

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.