KnowledgeBoat Logo

Computer Science

How are keywords different from identifiers ?

Python Funda

33 Likes

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.

Answered By

17 Likes


Related Questions