Variables

  • Referencing a given data structure is done by assigning our data structures to variables using the assignment operator, =.
  • Variables are references to values, like data structures, and the type of the variable is determined by the type of the value that is assigned to the variable.
  • Variables do not have a set data type; they are simply a name that refers to a value. The data type of a variable is determined by the type of the value that is currently assigned to the variable.
  • In Python, variables are references to objects, which means that when you create a variable and assign a value to it, the variable does not store the value directly, it instead stores a reference to the object that contains the value.