What Are Variables?
Variables in any programming language are storage places for values that provide them with a unique identifier. In short, they give a value a unique name. So, what’s special about Python variables? Here’s an example of a Python variable:
What Are Types?
As you can see, we can only add two compatible types together, because types help the computer understands what operations we can apply to what variables or values. On the last line of the example, we had to convert the type of mynumber2, in order to add our string of text to our number.That’s why types are important to programmers; to define what object type can perform which operations. Python’s main types are number, string, list(an array), dictionary( an object with key and value pairs), and object. Each type has its own operations and one important thing to note is that each type is a specialized object that inherits from the object type. This is the core concept of an object oriented programming language and should be remembered.
I hope this introduction to variables and types was helpful to Python variables, and if you have your own interpretation of the same information please share it below; this is only my understanding of Python variables. Understanding different types is an important part of understanding a programming language and creating your own types in your own programs!