In this section of your course, you got to know a whole lot of new data types. You won't remember everything about all of them right from the start, but you can always come back to revisit or look up information about each data type in Python's documentation on Built-in Types.
In Python 101, you learned about:
int: Integer numbers, such as12float: Floating-point numbers, such as42.0str: Text data, consisting of collections of characters, such as"hello"
You could already do quite a lot just by knowing these data types and some programming logic! However, these new data types expand the possibilities of what you can accomplish with your programs.
New Important Data Types
In this module, you've learned about some additional important data types:
tuple: Immutable, ordered collections of any type, such as("age", 33)list: Mutable, ordered collections of any type, such as[1, 2, 4, 8]set: Unordered collections of unique items, such as{"hello", "world", 42}dict: Mutable mappings between keys and values, such as{"name": "feivel", "age": 2}
There are many more data types, and you'll later learn that anything in Python can be its own data type. What you learned in this section are just some common data types that you'll use over and over again.
Info: A data type in Python is nothing special, and you'll later learn how to build your own data types. Think of them as standardized and useful ways to group-specific functionality that allow you to tackle certain challenges.
What are Data Types?
Data types are a helpful concept to categorize types of data into separate buckets. For example, there's something that's similar between all textual data. And often, you'll want to be able to treat some types of categories in a similar manner.
This is what data types were created for. They allow you to lump similar data together and perform common actions on that type of data.
Over your journey across the lands of Python, you'll keep encountering new custom data types that someone has written to fulfill a specific goal. Often, it'll be useful to learn how to work with that data type and use the abstraction that it provides for you.
On the other hand, by becoming familiar with the built-in data types that you've gotten to know up to now, you'll be able to handle almost any programming challenge that the world might throw at you.
Rejoice, give yourself a pat on the back, and get ready to apply some of the built-in data types you got to know in this section to your projects next.