course content

Course Content

Introduction to Python

Data TypesData Types

In Python, like in many other programming languages, you can work with objects of various types. It's essential to understand the differences among them, especially when considering how they're stored in computer memory. Here are the data types available in Python:

  • Text: str
  • Numeric: int, float, complex
  • Sequence: list, tuple, range
  • Mapping: dict
  • Set: set, frozenset
  • Boolean: bool
  • Binary: bytes, bytearray, memoryview


There's no necessity to memorize all of them at this moment.

We won't dive deep into every one of these data types right now, as we won't be using all of them immediately. Instead, we'll go into detail on each one in upcoming chapters. If you're curious about the type of a specific variable, use the type() function. And remember, always use the print() function to have Python display the result. For instance:


What type is the var variable from the example above?

Select the correct answer

Everything was clear?

Section 2. Chapter 4