Identifiers in Python

·

1 min read

An identifier is a name given to entities like class, functions, variables, etc. It helps to differentiate one entity from another

Rules for Identifiers in Python

  1. Alphabet Symbols (Either Upper case OR Lower case)
  2. If Identifier is start with Underscore (_) then it indicates it is private.
  3. Identifier should not start with Digits.
  4. Identifiers are case sensitive.
  5. We cannot use reserved words as identifiers Eg: def=10
  6. There is no length limit for Python identifiers. But not recommended to use too lengthy identifiers.
  7. Dollar ($) Symbol is not allowed in Python.