Simple ways to learn and remember variables and types in Python.
Everything in programming is stored in computer memory. The Data that we need are also stored in memory, variables is giving name to that certain area of memory where we can store certain values wether its string, numbers, list, or dictionaries and more it helps to name the data stored in the computer.
Rules of Creating Variables
- Variables needs to start with a letter either lower or upper case, or underscore _
- Python is a case sensitive with variables so an uppercase Name and lower case name are two different variables.
- Variable names can’t begin with numbers but can mix and match letters, numbers and underscores.
- Last thing maybe similar to a lot of programming language which is creating it with attaching a value with an equal sign =.
Example of variables and types.
You can Rebind a variable to a value by giving it another value in another line.
You can also check the data type of variable by printing print(type(variable))