ProgrammingVery hardCAT · MBA placement

What is printed?

What is printed?
import keyword
print(keyword.iskeyword('match'), keyword.issoftkeyword('match'), keyword.iskeyword('None'), 'match'.isidentifier())
  1. A. True True True True
  2. B. False True True True
  3. C. False False True True
  4. D. True True False True

Correct answer: B. False True True True

match is a soft keyword, so it is not in the hard keyword list but is in the soft keyword list. None is a hard keyword, and match is still a valid identifier.

More Python Programming questions

Exams that ask this topic