Variables and Types in Python

Madiwa Simon
2 min readNov 7, 2021

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

  1. Variables needs to start with a letter either lower or upper case, or underscore _
  2. Python is a case sensitive with variables so an uppercase Name and lower case name are two different variables.
  3. Variable names can’t begin with numbers but can mix and match letters, numbers and underscores.
  4. 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))

--

--