Class variables can only be assigned when a class has been defined. Instance variables, on the other hand, can be assigned or changed at any time . Both class variables and instance variables store a value in a program, just like any other Python variable.