Practice mode Python

Which of the following is a soft keyword in Python, reserved only in certain contexts?

Correct answer A. match

Explanation

Soft keywords such as match, case and _ are treated as keywords only in specific grammar contexts, like the start of a match statement, so existing code can still use match as a variable name. yield, async and with are hard keywords that can never be used as identifiers.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.