Building Blocks of Python: Identifiers

 Building Blocks of Python:

2. Identifiers

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

Rules for writing identifiers:

  1. Identifiers can be a combination of
                        a. letters in lowercase (a to z), or
                        b. letters in uppercase (A to z), or
                        c. digits (0 to 9), or
                        d. an underscore (_)
  




        2. An identifier cannot start with a digit







        3. Cannot use keywords as identifiers






          4. Cannot use special characters [except from underscore (_)]











Comments