top of page

Data types are like different kinds of toys that we can play with in Python coding. Just like how we have different toys for different games, we have different data types for different kinds of information. For example, we have numbers, words, and even pictures! It's important to use the right data type for the information we want to work with, so that our code can understand what we want it to do. Here's the most important data types to know when learning Python.

Boolean

Is it True or False?

A boolean is like a light switch. It can either be on or off, true or false. Just like how a light switch can turn a light on or off, a boolean can help us make decisions in a computer program. Decisions can be made based on the condition of a boolean.

Integer

1, 2, 3, 4, 5...

An integer in Python is a type of number that doesn't have any decimal places. It's like counting with whole numbers, like 1, 2, 3, 4, and so on. An integer type is most commonly used in basic Python to represent numbers. You can add, subtract, multiply, and divide different integer values.
 

Strings

What About Words?

A string is a type of data that represents a sequence of characters. Think of it like a "string" of beads, where each bead is a letter or symbol. So when we talk about a string in Python, we're talking about a bunch of letters and symbols that are grouped together. These strings can be printed out, compared, or stored in the computer.

Lists

I Want Multiple Things...

A list is like a container that can hold a bunch of different things, like numbers or words It's kind of like a grocery bag that you can fill up with all sorts of items. Normally, each item in the bag has the same datatype as all of the other items. And just like how you can take things out of a grocery or add more things to it, you can do the same thing with a list Python.

bottom of page