For any queries you can reach us at infovistarindia@gmail.com / WhatsApp us: +919158876092

Identifiers in Python

Rules to define Python Identifiers

Identifiers in Python
  1. An identifier in Python must starts with a letter a to z or A to Z or an underscore (_) succeeded by zero or more letters, digits (0 to 9), and underscores.
  2. Special characters are not allowed in identifiers.
  3. An identifier should not be a reserved keyword of Python.
  4. Python is a case sensitive programming language.
  5. In Python Class names must be start with an uppercase letter For example: class Student. All identifiers start with a lowercase letter in Python.
  6. A private identifier in python starts with a single leading underscore (_name).
  7. A strongly private identifier in python starts with two leading underscores (__name) defined .
  8. The identifier is a language-defined special name, If the identifier starts and ends with two underscores (__name__).