Basic Variable Types in Python

Banana Chip Tech
CodeX
Published in
4 min readJun 26, 2021

--

This written lesson is part of Banana Chip Tech’s Python Crash Course. For video lectures, programming homework assignments, and other content please visit our website.

Variables are ways that we can store information for use later on in a program. For this reason, they are incredibly helpful when programming. The way that I like to think about variables are like jars where we can stuff information in and then take information out later. A good real world example of what a variable does can be found in food containers. The food container itself would be the variable and the food that it holds would be the data that a variable would hold. For instance, we can store some peanut butter in our peanut butter jar. We can then take our peanut butter out of the jar and use it when we want to make our peanut butter and jelly sandwich. Similarly, we can have a pizza box which is holding our pizza. Later on when we are hungry, we can take out a piece of pizza and eat it. Both the peanut butter jar and pizza box act as storage containers, but what they store is different. All python variables store information, but the type of information that they store differs.

While python doesn’t force you to document what specific type of variable you’re going to be using, knowing the type of variable used can be critical for the success of your program. I like to classify python…

--

--

Banana Chip Tech
CodeX

Banana Chip Tech is focused on optimizing healthcare through computation! We build apps, create websites, and develop tech courses for healthcare professionals!