Python variables and identifiers

Variables are a very important role in Programming Language, you can store any piece of information in a variable. Variables are nothing but it’s just parts of your computer’s memory where information is stored. Variables are reserved memory locations that stores the values. So, each variable is given an appropriate name, every variable is assigned a name which can be used to refer to the value in the program.

Identifiers : Identifiers are as the name suggests and the names given to identify something. This something can be a variable, function, class, module or object. There are some following basic rule for Python Variables or identifiers :

  • The first character of an identifier may be an underscore (‘_’) or first character of an identifier start with a letter must be lowercase or upper case.
  • The rest of the identifier name can be underscore (‘_’)
  • Identifier names are case sensitive, Example: python, Python are two different variables or identifiers.
  • Punctuation characters such as @, $, % , This types characters are not allowed.