Python MCQs with Explanation

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. with
  4. try



Answer: 
Option a: val

In the given options, "raise," "with," and "try" are all keywords in Python:
  • "raise" is used to raise exceptions explicitly.
  • "with" is used in context managers to define a block of code with setup and teardown operations.
  • "try" is used in exception handling to mark a block of code where exceptions may occur.
"val" is not a keyword in Python.

NAMESTE GUYS, Feel free to ask your doubts and all computer science related questions in comments section or through contact form. Thank you.

Post a Comment

0 Comments