# DS051023 (Python Variables)

Variables : variables are the containers used for referring to the data items. These are the reference points

which refers to the memory address where the data item is stored.

e.g
Name = “Divya”

Rules of naming a variable :

‘’’

  1. A variable name includes only alphabets, numbers and underscore. No other characters are allowed.
  2. A variable name should always start with an alphabet or underscore.
  3. special characters (other than underscore) and spaces are not allowed in the variable name.
  4. A variable name cannot be a Python keyword.

‘’’

Some methods for naming multi-word variable name

‘’’

  1. camel case - In camel case, each word other than first, starts with a capital letter and rest of the letters
    are in small case.

e.g firstName = “Divya”
myFirstVariable = “Variable”

  1. pascal case = In pascal case, each word, starts with a capital letter and rest of the letters
    are in small case.

e.g FirstName = “Divya”
MyFirstVariable = “Variable”

  1. Snake case - In snake case, each word is seperated by an underscore.

e.g snake_case = “This is snake case”

‘’’

Acknowledged your Class