Computer Applications
What is an identifier ? What are the identifier forming rules of Python ?
Python Funda
3 Likes
Answer
Identifiers are fundamental building blocks of a program and are used as the general terminology for the names given to different parts of the program viz variables, objects, classes, functions, lists, dictionaries etc. For example, Myfile, _DS, _name_01, H34CAP etc.
The identifier forming rules of Python are:
- An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores, and digits (0 to 9).
- Python does not allow punctuation characters such as @, $, and % within identifiers.
- Reserved words (keywords) must not be used as identifiers.
Answered By
2 Likes