Python Identifiers

 A name in python program is called python identifiers

Eg :  a=10

The identifiers only allowed character in python are :

  1. alphabet symbols(lower and upper)
  2. digit (0 to 9)
  3. underscore symboll(_)
  4. Identifer should not start with digits
  5. identifiers are case sensitive
  6. We cant use reserved word as identifiers
  7. There is no lenght limit for python identifiers but not recommended to use too lenghty identifer
  8. Dollor symbol is blocked or not allowed in python

Examples:-

  1. 123a ==>> worng identifier
  2. total123
  3. javatest
  4. ca$sh ==>> worng identifier
  5. _abc_def ==>> private variable(always start with undersocpe)
  6. def ==>> worng
  7. if ==>> worng
  8. __test ==>> (strongly Private variable)
  9. __add__ ==>> (Magic Method)




Comments