Python Data Types

Go Gocourse AI Updated 16 Aug 2026
1 min read ·Lesson 3 of 6
In this post

The built-in types you will use every day, and how Python decides which one you have.

The built-in types you will use every day, and how Python decides which one you have.

The everyday types

Numbers, text, booleans and None cover most of what a program holds. type() answers what you actually have, which is the fastest way to settle an argument with yourself.

print(type(3), type(3.0))
print(type("3"), type(True), type(None))

Output:

 
  

Converting between them

Conversions are explicit. Python will not quietly add a string to a number, which is the error most often met on day one.

total = int("12") + 3
print(total, str(total) + " items")

Output:

15 15 items

Next

Carry on to the next tutorial in the rail — it picks up where this one leaves off.

PythonData Types

0 Comments

Reviewed before they appear

No comments yet.

Python
On this page
On this page
Python 6 posts
See all
Topics
PythonData Types