Home / Python / Basics

Data types

Every value has a type: int, float, str, bool, or a collection. Use type(x) to check. Text is covered in strings. Collections are covered in lists and dicts.

print(type(3))
print(type(3.0))
print(type("hi"))
print(type(True))

Test yourself on this