CBSE Class 12 Computer Science Question 48 of 105

Python Revision Tour — Question 2

Back to all questions
2
Question

Question 2

How are keywords different from identifiers?

Answer

Keywords are reserved words carrying special meaning and purpose to the language compiler/interpreter. For example, if, elif, etc. are keywords. Identifiers are user defined names for different parts of the program like variables, objects, classes, functions, etc. Identifiers are not reserved. They can have letters, digits and underscore. They must begin with either a letter or underscore. For example, _chk, chess, trail, etc.